|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.tools.CompressTool
public class CompressTool
A tool to losslessly compress data, and expand the compressed data again.
Method Summary | |
---|---|
int |
compress(byte[] in,
int len,
Compressor compress,
byte[] out)
INTERNAL |
byte[] |
compress(byte[] in,
java.lang.String algorithm)
Compressed the data using the specified algorithm. |
byte[] |
expand(byte[] in)
Expands the compressed data. |
void |
expand(byte[] in,
byte[] out,
int outPos)
INTERNAL |
int |
getCompressAlgorithm(java.lang.String algorithm)
INTERNAL |
static CompressTool |
getInstance()
Get a new instance. |
static java.io.InputStream |
wrapInputStream(java.io.InputStream in,
java.lang.String compressionAlgorithm,
java.lang.String entryName)
INTERNAL |
static java.io.OutputStream |
wrapOutputStream(java.io.OutputStream out,
java.lang.String compressionAlgorithm,
java.lang.String entryName)
INTERNAL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CompressTool getInstance()
public byte[] compress(byte[] in, java.lang.String algorithm)
in
- the byte array with the original dataalgorithm
- the algorithm (LZF, DEFLATE)
SQLException
- if a error occurspublic int compress(byte[] in, int len, Compressor compress, byte[] out)
public byte[] expand(byte[] in)
in
- the byte array with the compressed data
SQLException
- if a error occurspublic void expand(byte[] in, byte[] out, int outPos)
public int getCompressAlgorithm(java.lang.String algorithm)
public static java.io.OutputStream wrapOutputStream(java.io.OutputStream out, java.lang.String compressionAlgorithm, java.lang.String entryName)
public static java.io.InputStream wrapInputStream(java.io.InputStream in, java.lang.String compressionAlgorithm, java.lang.String entryName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |