@NoImplement public interface CompressionStrategy
CompressionStrategy
is a base interface for Different compression strategiesModifier and Type | Method and Description |
---|---|
byte[] |
compressByteArray(byte[] bytes)
Compresses a byte array.
|
InputStream |
compressInputStream(InputStream is)
Compresses an
InputStream . |
boolean |
isCompressed(byte[] bytes)
Checks whether a byte array has been compressed or not.
|
byte[] |
uncompressByteArray(byte[] bytes)
Uncompresses a compressed byte array.
|
InputStream |
uncompressInputStream(InputStream is)
Uncompresses a compressed
InputStream . |
byte[] compressByteArray(byte[] bytes) throws IOException
bytes
- The byte array to compress.IOException
- If an I/O error has occurred.InputStream compressInputStream(InputStream is) throws IOException
InputStream
.is
- The InputStream
to compress.InputStream
.IOException
- If an I/O error has occurred.byte[] uncompressByteArray(byte[] bytes) throws IOException
bytes
- The byte array to uncompress.IOException
- If an I/O error has occurred.InputStream uncompressInputStream(InputStream is) throws IOException
InputStream
.is
- The compressed InputStream
.InputStream
.IOException
- If an I/O error has occurred.boolean isCompressed(byte[] bytes) throws IOException
bytes
- The byte array.IOException
- If an I/O error has occurred.Copyright © 2018. All rights reserved.