HEADER

ru.biosoft.util
Class FileBuffer

Direct Known Subclasses:
ConservativeFastFileBuffer, FastFileBuffer, SoftFileBuffer

public abstract class FileBuffer

RandomAccessBuffer provides buffered reading/writing of random access file Class provides fast access for extracting of sequential data.


Method Summary
 abstract voidclose()
          Closes the buffer.
 abstract byteread(int pos)
          Reads one byte from requested position.
 abstract voidwrite(int pos, byte bt)
          Writes one byte to the requested position in the buffer.

Method Detail

close

public abstract void close()
throws java.io.IOException
Closes the buffer.
Throws:
IOException - if an I/O error occurs.

read

public abstract byte read(int pos)
throws java.io.IOException
Reads one byte from requested position.
Parameters:
pos - position of requested byte
Returns: requested byte
Throws:
IOException - If any I/O errors

write

public abstract void write(int pos, byte bt)
throws java.io.IOException
Writes one byte to the requested position in the buffer.
Parameters:
pos - position of requested byte
bt - stored byte
Throws:
IOException - If any I/O errors

FOOTER

BOTTOM