Package org.aksw.commons.io.block.api
Interface Segment
- All Superinterfaces:
AutoCloseable,org.aksw.commons.io.util.channel.ChannelFactory<Seekable>
- All Known Implementing Classes:
PageBase
A segment is a sequence of bytes with a fixed size.
Channels provide access to this sequence using a linear position.
Channels may maintain internal pointers corresponding to a position.
This may speed up speed up relative read operations as e.g. lookup of the right bucket
for consecutive reads can be skipped.
- Author:
- raven
-
Method Summary
Modifier and TypeMethodDescriptionlonglength()Retrieve the length of the segment For segments that are based on encoded data this method may trigger a full read.Methods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface org.aksw.commons.io.util.channel.ChannelFactory
newChannel
-
Method Details
-
length
Retrieve the length of the segment For segments that are based on encoded data this method may trigger a full read. Therefore, this method should be used with care.- Returns:
- Throws:
IOException
-