public interface CompressionMethod
An interface to describe a compression method.
Modifier and Type | Field and Description |
---|---|
static CompressionMethod |
DEFLATE
The “deflate” compression method.
|
static CompressionMethod |
GZIP
The “gzip” compression method.
|
static CompressionMethod |
ZLIB
The “zlib” compression method.
|
Modifier and Type | Method and Description |
---|---|
java.io.OutputStream |
compress(java.io.OutputStream outputStream)
Gets the compressed output stream.
|
java.io.InputStream |
decompress(java.io.InputStream inputStream)
Decompresses an input stream.
|
java.lang.String |
getName()
Gets the compression method name, e.g.
|
static final CompressionMethod ZLIB
The “zlib” compression method.
static final CompressionMethod GZIP
The “gzip” compression method.
static final CompressionMethod DEFLATE
The “deflate” compression method.
java.lang.String getName()
Gets the compression method name, e.g. “zlib”, “lzw”, “exi”, …
java.io.InputStream decompress(java.io.InputStream inputStream) throws java.io.IOException
Decompresses an input stream.
inputStream
- The compressed input stream.java.io.IOException
- If the decompression failed.java.io.OutputStream compress(java.io.OutputStream outputStream) throws java.io.IOException
Gets the compressed output stream.
outputStream
- The uncompressed output stream.java.io.IOException
- If the compression failed.Copyright © 2014–2019 XMPP.rocks. All rights reserved.