public interface ChunkCodec
| Modifier and Type | Method and Description |
|---|---|
com.google.protobuf.Message |
decode(byte[] bytes)
Decode the bytes to collection.
|
ByteArrayOutputStream |
encode(com.google.protobuf.Message readCollection)
Encode the protobuff collection to a byte of stream.
|
int |
getSuggestedChunkSize()
Return a suggestion for chunk size, to be used as default.
|
String |
name()
Return the name of this codec.
|
byte |
registrationCode()
Return the registration code of this codec, a byte that uniquely identifies this codec.
|
void |
setHandler(ProtobuffCollectionHandler parser) |
boolean |
validate(byte c,
DataInputStream input)
Validate that the input stream is at the start of a chunk encoded with this codec.
|
String name()
byte registrationCode()
ByteArrayOutputStream encode(com.google.protobuf.Message readCollection) throws IOException
readCollection - IOExceptioncom.google.protobuf.Message decode(byte[] bytes)
throws IOException
bytes - bytes for codec compressed stream.IOExceptionint getSuggestedChunkSize()
void setHandler(ProtobuffCollectionHandler parser)
boolean validate(byte c,
DataInputStream input)
c - input - input stream positioned at the start of the chunk.Copyright © 2017 Campagne Laboratory. All rights reserved.