public abstract class ByteArrayCompressor extends Compressor
Constructor and Description |
---|
ByteArrayCompressor(Serializer serializer) |
ByteArrayCompressor(Serializer serializer,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
abstract void |
compress(byte[] inputBytes,
int inputLength,
java.nio.ByteBuffer outputBuffer)
Implementations should read the specified number of input bytes and write compressed data to the output buffer.
|
void |
compress(java.nio.ByteBuffer inputBuffer,
java.lang.Object object,
java.nio.ByteBuffer outputBuffer)
The compressor should read the input buffer from the current position to the limit, compress the data, and put the result in
the output buffer.
|
abstract void |
decompress(byte[] inputBytes,
int inputLength,
java.nio.ByteBuffer outputBuffer)
Implementations should read the specified number of input bytes and write decompressed data to the output bytes.
|
void |
decompress(java.nio.ByteBuffer inputBuffer,
java.lang.Class type,
java.nio.ByteBuffer outputBuffer)
The compressor should read the input buffer from the current position to the limit, decompress the data, and put the result
in the output buffer.
|
readObjectData, setCompress, setDecompress, writeObjectData
isFinal, newInstance, readObject, setCanBeNull, writeObject
public ByteArrayCompressor(Serializer serializer)
public ByteArrayCompressor(Serializer serializer, int bufferSize)
public void compress(java.nio.ByteBuffer inputBuffer, java.lang.Object object, java.nio.ByteBuffer outputBuffer)
Compressor
compress
in class Compressor
outputBuffer
- A non-direct buffer.public abstract void compress(byte[] inputBytes, int inputLength, java.nio.ByteBuffer outputBuffer)
outputBuffer
- A non-direct buffer.public void decompress(java.nio.ByteBuffer inputBuffer, java.lang.Class type, java.nio.ByteBuffer outputBuffer)
Compressor
decompress
in class Compressor
outputBuffer
- A non-direct buffer.public abstract void decompress(byte[] inputBytes, int inputLength, java.nio.ByteBuffer outputBuffer)
outputBuffer
- A non-direct buffer.