public abstract class BaseCodec extends Object implements Codec
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOGGER |
Constructor and Description |
---|
BaseCodec() |
Modifier and Type | Method and Description |
---|---|
byte[] |
compress(byte[][] data,
CodecOptions options)
2D data block encoding default implementation.
|
byte[] |
decompress(byte[] data)
Decompresses a block of data.
|
byte[] |
decompress(byte[][] data)
Decompresses a block of data.
|
byte[] |
decompress(byte[][] data,
CodecOptions options)
2D data block decoding default implementation.
|
byte[] |
decompress(byte[] data,
CodecOptions options)
Decompresses a block of data.
|
abstract byte[] |
decompress(RandomAccessInputStream in,
CodecOptions options)
Decompresses data from the given RandomAccessInputStream.
|
void |
test()
Main testing method default implementation.
|
public void test() throws FormatException
FormatException
- Can only occur if there is a bug in the
compress method.public byte[] compress(byte[][] data, CodecOptions options) throws FormatException
compress
in interface Codec
data
- The data to be compressed.options
- Options to be used during compression, if appropriate.FormatException
- If input is not a compressed data block of the
appropriate type.public byte[] decompress(byte[] data) throws FormatException
Codec
decompress
in interface Codec
data
- the data to be decompressed.FormatException
- If data is not valid compressed data for this
decompressor.public byte[] decompress(byte[][] data) throws FormatException
Codec
decompress
in interface Codec
data
- The data to be decompressed.FormatException
- If data is not valid compressed data for this
decompressor.public byte[] decompress(byte[] data, CodecOptions options) throws FormatException
Codec
decompress
in interface Codec
data
- the data to be decompressedoptions
- Options to be used during decompression.FormatException
- If data is not valid.public abstract byte[] decompress(RandomAccessInputStream in, CodecOptions options) throws FormatException, IOException
Codec
decompress
in interface Codec
in
- The stream from which to read compressed data.options
- Options to be used during decompression.FormatException
- If data is not valid compressed data for this
decompressor.IOException
public byte[] decompress(byte[][] data, CodecOptions options) throws FormatException
decompress
in interface Codec
data
- The data to be decompressed.options
- Options to be used during decompression.FormatException
- If input is not a compressed data block of the
appropriate type.Copyright © 2014 Open Microscopy Environment