ru.biosoft.util
Class FileBuffer

java.lang.Object
  extended byru.biosoft.util.FileBuffer
Direct Known Subclasses:
ConservativeFastFileBuffer, FastFileBuffer, SoftFileBuffer

public abstract class FileBuffer
extends java.lang.Object

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


Constructor Summary
FileBuffer()
           
 
Method Summary
abstract  void close()
          Closes the buffer.
abstract  byte read(int pos)
          Reads one byte from requested position.
abstract  void write(int pos, byte bt)
          Writes one byte to the requested position in the buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileBuffer

public FileBuffer()
Method Detail

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:
java.io.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:
java.io.IOException - If any I/O errors

close

public abstract void close()
                    throws java.io.IOException
Closes the buffer.

Throws:
java.io.IOException - if an I/O error occurs.


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.