Package db.buffers
Interface InputBlockStream
-
- All Superinterfaces:
java.lang.AutoCloseable
,BlockStream
,java.io.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
All Methods Instance Methods Abstract Methods 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
-
-
-
-
Method Detail
-
readBlock
BufferFileBlock readBlock() throws java.io.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:
java.io.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 interfaceBlockStream
- 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
-
-