public class NotCompressedChunkCodec extends Object implements ChunkCodec
| Modifier and Type | Field and Description |
|---|---|
static byte |
REGISTRATION_CODE |
| Constructor and Description |
|---|
NotCompressedChunkCodec() |
| 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.
|
public static final byte REGISTRATION_CODE
public void setHandler(ProtobuffCollectionHandler parser)
setHandler in interface ChunkCodecpublic boolean validate(byte c,
DataInputStream input)
ChunkCodecvalidate in interface ChunkCodecinput - input stream positioned at the start of the chunk.public String name()
ChunkCodecname in interface ChunkCodecpublic byte registrationCode()
ChunkCodecregistrationCode in interface ChunkCodecpublic ByteArrayOutputStream encode(com.google.protobuf.Message readCollection) throws IOException
ChunkCodecencode in interface ChunkCodecIOExceptionpublic com.google.protobuf.Message decode(byte[] bytes)
throws IOException
ChunkCodecdecode in interface ChunkCodecbytes - bytes for codec compressed stream.IOExceptionpublic int getSuggestedChunkSize()
ChunkCodecgetSuggestedChunkSize in interface ChunkCodecCopyright © 2018 Campagne Laboratory. All rights reserved.