Package org.aksw.commons.io.block.api
Interface Block
- All Superinterfaces:
AutoCloseable,org.aksw.commons.io.util.channel.ChannelFactory<Seekable>,Segment
- All Known Subinterfaces:
Page
- All Known Implementing Classes:
PageBase
A block is a sub-sequence of bytes with a fixed finite length which
however may be initially unknown, and thus has a certain horizon of explored length.
A block's full length can at any time be requested, hence a Block is a subclass of Segment.
A block has an offset value into the sequence that contains the block.
For example, a block
may backed by a bz2 decoding input stream, and only if
the stream hits the end, we know how much data there is
actually in the block.
- Author:
- raven
-
Method Summary
Methods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface org.aksw.commons.io.util.channel.ChannelFactory
newChannel
-
Method Details
-
getOffset
long getOffset()Offset in a parent container; should be 0 if there is none- Returns:
-
nextBlock
The block source of this block - if any.- Returns:
- the block source or null if there is none
- Throws:
IOException
-
prevBlock
- Throws:
IOException
-
hasNext
Check if there is a subsequent block.- Returns:
- Throws:
IOException
-
hasPrev
- Throws:
IOException
-