Package org.bouncycastle.apache.bzip2
Class CBZip2OutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.bouncycastle.apache.bzip2.CBZip2OutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,BZip2Constants
public class CBZip2OutputStream extends OutputStream implements BZip2Constants
An output stream that compresses into the BZip2 format (with the file header chars) into another stream.- Author:
- Keiron Liddle TODO: Update to BZip2 1.0.1 NB: note this class has been modified to add a leading BZ to the start of the BZIP2 stream to make it compatible with other PGP programs.
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
CLEARMASK
protected static int
DEPTH_THRESH
protected static int
GREATER_ICOST
protected static int
LESSER_ICOST
protected static int
QSORT_STACK_SIZE
protected static int
SETMASK
protected static int
SMALL_THRESH
-
Fields inherited from interface org.bouncycastle.apache.bzip2.BZip2Constants
baseBlockSize, G_SIZE, MAX_ALPHA_SIZE, MAX_CODE_LEN, MAX_SELECTORS, N_GROUPS, N_ITERS, NUM_OVERSHOOT_BYTES, rNums, RUNA, RUNB
-
-
Constructor Summary
Constructors Constructor Description CBZip2OutputStream(OutputStream inStream)
CBZip2OutputStream(OutputStream inStream, int inBlockSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected void
finalize()
void
finish()
void
flush()
protected static void
hbMakeCodeLengths(char[] len, int[] freq, int alphaSize, int maxLen)
void
write(int bv)
modified by Oliver Merkel, 010128-
Methods inherited from class java.io.OutputStream
nullOutputStream, write, write
-
-
-
-
Field Detail
-
SETMASK
protected static final int SETMASK
- See Also:
- Constant Field Values
-
CLEARMASK
protected static final int CLEARMASK
- See Also:
- Constant Field Values
-
GREATER_ICOST
protected static final int GREATER_ICOST
- See Also:
- Constant Field Values
-
LESSER_ICOST
protected static final int LESSER_ICOST
- See Also:
- Constant Field Values
-
SMALL_THRESH
protected static final int SMALL_THRESH
- See Also:
- Constant Field Values
-
DEPTH_THRESH
protected static final int DEPTH_THRESH
- See Also:
- Constant Field Values
-
QSORT_STACK_SIZE
protected static final int QSORT_STACK_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CBZip2OutputStream
public CBZip2OutputStream(OutputStream inStream) throws IOException
- Throws:
IOException
-
CBZip2OutputStream
public CBZip2OutputStream(OutputStream inStream, int inBlockSize) throws IOException
- Throws:
IOException
-
-
Method Detail
-
hbMakeCodeLengths
protected static void hbMakeCodeLengths(char[] len, int[] freq, int alphaSize, int maxLen)
-
write
public void write(int bv) throws IOException
modified by Oliver Merkel, 010128- Specified by:
write
in classOutputStream
- Throws:
IOException
-
finalize
protected void finalize() throws Throwable
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
finish
public void finish() throws IOException
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
-