|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.connectivity.framework.crawler.web.util.GZIPUtils
public final class GZIPUtils
A collection of utility methods for working on GZIPed data.
| 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 |
| Method Detail |
|---|
public static byte[] unzipBestEffort(byte[] in)
null is returned.
in - input byte array
public static 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.
in - input byte arraysizeLimit - value in bytes to truncate gunzziped copy of the input array
public static byte[] unzip(byte[] in)
throws java.io.IOException
in - input byte array
java.io.IOException - if the input cannot be properly decompressedpublic static byte[] zip(byte[] in)
in - input byte array
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||