Class SnappyCodec
- java.lang.Object
- 
- jadex.platform.service.serialization.codecs.AbstractCodec
- 
- jadex.platform.service.serialization.codecs.SnappyCodec
 
 
- 
- All Implemented Interfaces:
- ICodec
 
 public class SnappyCodec extends AbstractCodec Converts byte[] -> byte[] in both directions.
- 
- 
Field SummaryFields Modifier and Type Field Description static intCODEC_IDThe gzip codec id.
 - 
Constructor SummaryConstructors Constructor Description SnappyCodec()Create a new codec.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decode(byte[] bytes, int offset, int length)Decode bytes.byte[]decode(java.lang.Object bytes)Decode an object.static byte[]decodeBytes(byte[] bytes, int offset, int length)Decode bytes.static byte[]decodeBytes(java.io.ByteArrayInputStream bais)Decode bytes.byte[]encode(byte[] val)Encode an object.static byte[]encodeBytes(byte[] val)Encode an object.intgetCodecId()Get the codec id.- 
Methods inherited from class jadex.platform.service.serialization.codecs.AbstractCodecdecode
 
- 
 
- 
- 
- 
Field Detail- 
CODEC_IDpublic static final int CODEC_ID The gzip codec id.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getCodecIdpublic int getCodecId() Get the codec id.- Returns:
- The codec id.
 
 - 
encodepublic byte[] encode(byte[] val) Encode an object.- Parameters:
- obj- The object.
- Returns:
- The encoded object.
- Throws:
- java.io.IOException
 
 - 
decodepublic byte[] decode(java.lang.Object bytes) Decode an object.- Returns:
- The decoded object.
- Throws:
- java.io.IOException
 
 - 
decodepublic byte[] decode(byte[] bytes, int offset, int length)Decode bytes.- Parameters:
- bytes- The value bytes as byte array or input stream.
- Returns:
- The decoded bytes.
- Throws:
- java.io.IOException
 
 - 
encodeBytespublic static byte[] encodeBytes(byte[] val) Encode an object.- Parameters:
- obj- The object.
- Throws:
- java.io.IOException
 
 - 
decodeBytespublic static byte[] decodeBytes(byte[] bytes, int offset, int length)Decode bytes.- Returns:
- The decoded bytes.
- Throws:
- java.io.IOException
 
 - 
decodeBytespublic static byte[] decodeBytes(java.io.ByteArrayInputStream bais) Decode bytes.- Returns:
- The decoded bytes.
- Throws:
- java.io.IOException
 
 
- 
 
-