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 Summary

  Modifier and Type
  Method
  Description
  `int`
  `getBlockCount()`
  Get the total number of blocks to be transfered.
  `boolean`
  `includesHeaderBlock()`
  Determine if header block included in stream.
  `BufferFileBlock`
  `readBlock()`
  Read next block from stream

  ### Methods inherited from interface db.buffers.BlockStream

  `getBlockSize`

  ### Methods inherited from interface java.io.Closeable

  `close`

- ## 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