Package crosby.binary.file
Interface BlockReaderAdapter
-
- All Known Implementing Classes:
BinaryParser
public interface BlockReaderAdapter
An adaptor that receives blocks from an input stream
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
complete()
Called when the file is fully read.void
handleBlock(FileBlock message)
Called with the data in the block.boolean
skipBlock(FileBlockPosition message)
Does the reader understand this block? Does it want the data in it? A reference contains the metadata about a block and can saved --- or stored ---- for future random access.
-
-
-
Method Detail
-
skipBlock
boolean skipBlock(FileBlockPosition message)
Does the reader understand this block? Does it want the data in it? A reference contains the metadata about a block and can saved --- or stored ---- for future random access. However, during a strea read of the file, does the user want this block? handleBlock will be called on all blocks that are not skipped, in file order.
-
handleBlock
void handleBlock(FileBlock message)
Called with the data in the block.
-
complete
void complete()
Called when the file is fully read.
-
-