Package org.igniterealtime.jbosh
Class ZLIBCodec
java.lang.Object
org.igniterealtime.jbosh.ZLIBCodec
Codec methods for compressing and uncompressing using ZLIB.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
Size of the internal buffer when decoding. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
BUFFER_SIZE
private static final int BUFFER_SIZESize of the internal buffer when decoding.- See Also:
-
-
Constructor Details
-
ZLIBCodec
private ZLIBCodec()Prevent construction.
-
-
Method Details
-
getID
Returns the name of the codec.- Returns:
- string name of the codec (i.e., "deflate")
-
encode
Compress/encode the data provided using the ZLIB format.- Parameters:
data
- data to compress- Returns:
- compressed data
- Throws:
IOException
- on compression failure
-
decode
Uncompress/decode the data provided using the ZLIB format.- Parameters:
data
- data to uncompress- Returns:
- uncompressed data
- Throws:
IOException
- on decompression failure
-