public class FastBufferedMessageChunksReader extends MessageChunksReader
MessageChunksWriter.chunkCodec, compressedBytes, entryIndex, in, streamPositionAtStart| Constructor and Description |
|---|
FastBufferedMessageChunksReader(long start,
long end,
it.unimi.dsi.fastutil.io.FastBufferedInputStream input)
Support for splitting the entries on the file system.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush()
Flush buffer so that content will be read from the input again.
|
boolean |
hasNext(com.google.protobuf.GeneratedMessage collection,
int collectionSize)
Returns true if the input has more entries.
|
long |
position() |
void |
seek(long position)
Seek to the given position in the compact file.
|
getChunkCodec, getCompressedBytes, getEntryIndex, incrementEntryIndex, setChunkCodec, setHandlerpublic FastBufferedMessageChunksReader(long start,
long end,
it.unimi.dsi.fastutil.io.FastBufferedInputStream input)
throws IOException
start - The start index for the splitend - The end index for the splitinput - The input stream containing the dataIOException - if there is a problem reading from the streampublic void seek(long position)
throws IOException
position - Position where to seek to.IOException - If an error occurs reading this file.public boolean hasNext(com.google.protobuf.GeneratedMessage collection,
int collectionSize)
hasNext in class MessageChunksReadercollection - The current collection, or null if no collection has been read yet.collectionSize - The size of the current collection (can be zero).public void close()
close in interface Closeableclose in interface AutoCloseableclose in class MessageChunksReaderpublic long position()
throws IOException
position in class MessageChunksReaderIOExceptionpublic void flush()
Copyright © 2017 Campagne Laboratory. All rights reserved.