Methods Summary |
---|
protected java.lang.String | getCompressionName()Get the name of the compression method.
return "Bzip2";
|
protected java.io.InputStream | wrapStream(java.io.InputStream in)Decompress on the fly using {@link CBZip2InputStream}.
for (int i = 0; i < MAGIC.length; i++) {
if (in.read() != MAGIC[i]) {
throw new IOException("Invalid bz2 stream.");
}
}
return new CBZip2InputStream(in);
|
protected java.io.OutputStream | wrapStream(java.io.OutputStream out)Compress on the fly using {@link CBZip2OutputStream}.
for (int i = 0; i < MAGIC.length; i++) {
out.write(MAGIC[i]);
}
return new CBZip2OutputStream(out);
|