Package db.buffers

Interface InputBlockStream

All Superinterfaces:
AutoCloseable, BlockStream, Closeable

public interface InputBlockStream extends BlockStream
InputBlockStream provides a BufferFile input block stream. The nature of the stream and the block sequence is determined by the particular instance.
  • Method Details

    • readBlock

      BufferFileBlock readBlock() throws IOException
      Read next block from stream
      Returns:
      a BufferFile block which corresponds to a specific block index or null if no more blocks available
      Throws:
      IOException - if an unexpected error occurs while reading the file
    • getBlockCount

      int getBlockCount()
      Get the total number of blocks to be transfered.
      Specified by:
      getBlockCount in interface BlockStream
      Returns:
      total block count
    • includesHeaderBlock

      boolean includesHeaderBlock()
      Determine if header block included in stream. Some stream implementations do not include or don't have access to the buffer file header block and may be excluded. If header is required, it will need to be reconstructed by setting the free index list and all buffer file parameters.
      Returns:
      true if header block #0 included in stream, else false