org.sourceforge.beanindex.util
Class FileIntBuffer

java.lang.Object
  extended byorg.sourceforge.beanindex.util.FileIntBuffer

public class FileIntBuffer
extends java.lang.Object

This is an alternative for using ArrayList with Integer objects in it. This class uses a RandomAccessFile as a buffer

Author:
Sakthivel Muthusamy

Constructor Summary
FileIntBuffer(VirtualMemory vm)
           
 
Method Summary
 int get(int index)
          reads the entry at the index
 int[] getData()
          returns the data
 int length()
           
 int write(int data)
          writes one item into the buffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileIntBuffer

public FileIntBuffer(VirtualMemory vm)
Method Detail

write

public int write(int data)
          throws java.lang.Exception
writes one item into the buffer

Parameters:
data -
Returns:
int
Throws:
java.lang.Exception

getData

public int[] getData()
              throws java.lang.Exception
returns the data

Returns:
int
Throws:
java.lang.Exception

get

public int get(int index)
        throws java.lang.Exception
reads the entry at the index

Parameters:
index -
Returns:
int
Throws:
java.lang.Exception

length

public int length()
Returns:
int