public class CompressingChunkCodec extends ChunkCodec
| Constructor and Description |
|---|
CompressingChunkCodec()
Creates a new compressing chunk codex.
|
CompressingChunkCodec(int minChunkSize,
boolean optimize)
Creates a new compressing chunk codex.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode(byte[] bytes,
int len)
Do overwrite this methode for decoding a chunk.
|
void |
encode(byte[] bytes,
int len)
Do overwrite this methode for encoding a chunk.
|
writeDecoded, writeDecoded, writeEncoded, writeEncodedpublic CompressingChunkCodec()
public CompressingChunkCodec(int minChunkSize,
boolean optimize)
minChunkSize - Only chunks with a length less greater or equal to
minChunkSize are encoded.optimize - Write uncompress chunk if size of compressed chunk is greater
then size of plain chunk.public void encode(byte[] bytes,
int len)
throws java.io.IOException
ChunkCodecencode in class ChunkCodecbytes - Bytes of chunk. Note to respect the len parameter.len - Length of chunk.java.io.IOExceptionpublic void decode(byte[] bytes,
int len)
throws java.io.IOException
ChunkCodecdecode in class ChunkCodecbytes - Bytes of chunk. Note to respect the len parameter.len - Length of chunk.java.io.IOException© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.