public class MessageChunksReader extends Object implements Closeable
MessageChunksWriter.| Modifier and Type | Field and Description |
|---|---|
protected ChunkCodec |
chunkCodec |
protected byte[] |
compressedBytes |
protected int |
entryIndex |
protected DataInputStream |
in |
protected long |
streamPositionAtStart |
| Modifier | Constructor and Description |
|---|---|
protected |
MessageChunksReader() |
|
MessageChunksReader(InputStream input) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ChunkCodec |
getChunkCodec() |
byte[] |
getCompressedBytes() |
int |
getEntryIndex()
Returns the current entry index.
|
boolean |
hasNext(com.google.protobuf.GeneratedMessage collection,
int collectionSize)
Returns true if the input has more entries.
|
int |
incrementEntryIndex()
Returns the current entry index and increment.
|
long |
position() |
void |
setChunkCodec(ChunkCodec chunkCodec)
Set the codec to use when decoding chunks of data.
|
void |
setHandler(ProtobuffCollectionHandler collectionParser) |
protected DataInputStream in
protected int entryIndex
protected ChunkCodec chunkCodec
protected long streamPositionAtStart
protected byte[] compressedBytes
protected MessageChunksReader()
public MessageChunksReader(InputStream input)
public byte[] getCompressedBytes()
public boolean hasNext(com.google.protobuf.GeneratedMessage collection,
int collectionSize)
collection - The current collection, or null if no collection has been read yet.collectionSize - The size of the current collection (can be zero).public int incrementEntryIndex()
public int getEntryIndex()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic long position()
throws IOException
IOExceptionpublic void setChunkCodec(ChunkCodec chunkCodec)
chunkCodec - public void setHandler(ProtobuffCollectionHandler collectionParser)
public ChunkCodec getChunkCodec()
Copyright © 2017 Campagne Laboratory. All rights reserved.