public class ChunkCodec
extends java.lang.Object
| Constructor and Description |
|---|
ChunkCodec()
Creates a new codecs for encoding and decoding chunks.
|
ChunkCodec(boolean optimize)
Creates a new codecs for encoding and decoding chunks and sets the
optimize flag.
|
ChunkCodec(int minChunkSizeEnc)
Creates a new codecs for encoding and decoding chunks and sets the minimal
size of chunks that are encoded.
|
ChunkCodec(int minChunkSizeEnc,
boolean optimize)
Creates a new codex for encoding and decoding chunks, sets the minimal
size of chunks that are encoded and optimize flag.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(byte[] bytes,
int len)
Do overwrite this methode for decoding a chunk.
|
protected void |
encode(byte[] bytes,
int len)
Do overwrite this methode for encoding a chunk.
|
protected void |
writeDecoded(byte[] bytes)
Use this call back methode for decoding.
|
protected void |
writeDecoded(byte[] bytes,
int len)
Use this call back methode for decoding.
|
protected void |
writeEncoded(byte[] bytes)
Use this call back methode for encoding.
|
protected void |
writeEncoded(byte[] bytes,
int len)
Use this call back methode for encoding.
|
public ChunkCodec()
public ChunkCodec(int minChunkSizeEnc)
minChunkSizeEnc - Minimal size of chunks that are encoded.public ChunkCodec(boolean optimize)
optimize - true, if optimze.public ChunkCodec(int minChunkSizeEnc,
boolean optimize)
minChunkSizeEnc - Minimal size of chunks that are encoded.optimize - true, if optimze.protected void encode(byte[] bytes,
int len)
throws java.io.IOException
bytes - Bytes of chunk. Note to respect the len parameter.len - Length of chunk.java.io.IOExceptionprotected void decode(byte[] bytes,
int len)
throws java.io.IOException
bytes - Bytes of chunk. Note to respect the len parameter.len - Length of chunk.java.io.IOExceptionprotected final void writeEncoded(byte[] bytes)
throws java.io.IOException
bytes - Encoded bytes.java.io.IOExceptionprotected final void writeEncoded(byte[] bytes,
int len)
throws java.io.IOException
bytes - Encoded bytes.len - Length.java.io.IOExceptionprotected final void writeDecoded(byte[] bytes)
throws java.io.IOException
bytes - Encoded bytes.java.io.IOExceptionprotected final void writeDecoded(byte[] bytes,
int len)
throws java.io.IOException
bytes - Encoded bytes.len - Length.java.io.IOException© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.