public final class CompressionUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
compressByteArray(byte[] input)
Compress the byte array passed
|
static byte[] |
compressByteArray(byte[] input,
int bufferLength)
Compress the byte array passed
|
static byte[] |
decompressByteArray(byte[] input)
Decompress the byte array passed using a default buffer length of 1024.
|
static byte[] |
decompressByteArray(byte[] input,
int bufferLength)
Decompress the byte array passed
|
static byte[] |
decompressGzipByteArray(byte[] compressedByteArray)
decompress a gzip byte array, using a default buffer length of 1024
|
static byte[] |
decompressGzipByteArray(byte[] compressedByteArray,
int bufferlength)
decompress a gzip byte array, using a default buffer length of 1024
|
public static byte[] decompressByteArray(byte[] input)
input - compressed byte array webservice responsepublic static byte[] decompressByteArray(byte[] input,
int bufferLength)
input - compressed byte array webservice responsebufferLength - buffer lengthpublic static byte[] compressByteArray(byte[] input)
throws IOException
input - byte arrayIOException - thrown if we can't close the output streampublic static byte[] compressByteArray(byte[] input,
int bufferLength)
throws IOException
input - byte arraybufferLength - buffer lengthIOException - thrown if we can't close the output streampublic static byte[] decompressGzipByteArray(byte[] compressedByteArray)
throws IOException
compressedByteArray - gzip-compressed byte arrayIOException - thrown if there was a failure to construct the GzipInputStreampublic static byte[] decompressGzipByteArray(byte[] compressedByteArray,
int bufferlength)
throws IOException
compressedByteArray - gzip-compressed byte arraybufferlength - size of the buffer in bytesIOException - thrown if there was a failure to construct the GzipInputStreamCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.