public class GZIPUtils extends Object
| Constructor and Description |
|---|
GZIPUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
unzip(byte[] in)
Returns an gunzipped copy of the input array.
|
static byte[] |
unzipBestEffort(byte[] in)
Returns an gunzipped copy of the input array.
|
static byte[] |
unzipBestEffort(byte[] in,
int sizeLimit)
Returns an gunzipped copy of the input array, truncated to
sizeLimit bytes, if necessary. |
static byte[] |
zip(byte[] in)
Returns an gzipped copy of the input array.
|
public static final byte[] unzipBestEffort(byte[] in)
null is returned.public static final byte[] unzipBestEffort(byte[] in,
int sizeLimit)
sizeLimit bytes, if necessary. If the gzipped input
has been truncated or corrupted, a best-effort attempt is made to
unzip as much as possible. If no data can be extracted
null is returned.public static final byte[] unzip(byte[] in)
throws IOException
IOException - if the input cannot be properly decompressedpublic static final byte[] zip(byte[] in)
Copyright © 2007, 2014, Oracle and/or its affiliates. All rights reserved.