|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.nutch.util.GZIPUtils
public class GZIPUtils
A collection of utility methods for working on GZIPed data.
Constructor Summary | |
---|---|
GZIPUtils()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GZIPUtils()
Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |