|
||||||||
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) throws java.sql.SQLException
in
- the byte array with the original dataalgorithm
- the algorithm (LZF, DEFLATE)
java.sql.SQLException
- if a error occurspublic int compress(byte[] in, int len, Compressor compress, byte[] out)
public byte[] expand(byte[] in) throws java.sql.SQLException
in
- the byte array with the compressed data
java.sql.SQLException
- if a error occurspublic void expand(byte[] in, byte[] out, int outPos) throws java.sql.SQLException
java.sql.SQLException
public int getCompressAlgorithm(java.lang.String algorithm) throws java.sql.SQLException
java.sql.SQLException
public static java.io.OutputStream wrapOutputStream(java.io.OutputStream out, java.lang.String compressionAlgorithm, java.lang.String entryName) throws java.sql.SQLException
java.sql.SQLException
public static java.io.InputStream wrapInputStream(java.io.InputStream in, java.lang.String compressionAlgorithm, java.lang.String entryName) throws java.sql.SQLException
java.sql.SQLException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |