org.apache.commons.compress.compressors.bzip2
Class BZip2CompressorOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.apache.commons.compress.compressors.CompressorOutputStream
          extended by org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class BZip2CompressorOutputStream
extends CompressorOutputStream

An output stream that compresses into the BZip2 format (without the file header chars) into another stream. TODO: Update to BZip2 1.0.1


Field Summary
static int baseBlockSize
           
protected static int CLEARMASK
           
protected static int DEPTH_THRESH
           
static int G_SIZE
           
protected static int GREATER_ICOST
           
protected static int LESSER_ICOST
           
static int MAX_ALPHA_SIZE
           
static int MAX_CODE_LEN
           
static int MAX_SELECTORS
           
static int N_GROUPS
           
static int N_ITERS
           
static int NUM_OVERSHOOT_BYTES
           
protected static int QSORT_STACK_SIZE
           
static int[] rNums
           
static int RUNA
           
static int RUNB
           
protected static int SETMASK
           
protected static int SMALL_THRESH
           
 
Constructor Summary
BZip2CompressorOutputStream(java.io.OutputStream inStream)
           
BZip2CompressorOutputStream(java.io.OutputStream inStream, int inBlockSize)
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 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
write, write
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

baseBlockSize

public static final int baseBlockSize
See Also:
Constant Field Values

MAX_ALPHA_SIZE

public static final int MAX_ALPHA_SIZE
See Also:
Constant Field Values

MAX_CODE_LEN

public static final int MAX_CODE_LEN
See Also:
Constant Field Values

RUNA

public static final int RUNA
See Also:
Constant Field Values

RUNB

public static final int RUNB
See Also:
Constant Field Values

N_GROUPS

public static final int N_GROUPS
See Also:
Constant Field Values

G_SIZE

public static final int G_SIZE
See Also:
Constant Field Values

N_ITERS

public static final int N_ITERS
See Also:
Constant Field Values

MAX_SELECTORS

public static final int MAX_SELECTORS
See Also:
Constant Field Values

NUM_OVERSHOOT_BYTES

public static final int NUM_OVERSHOOT_BYTES
See Also:
Constant Field Values

rNums

public static final int[] rNums
Constructor Detail

BZip2CompressorOutputStream

public BZip2CompressorOutputStream(java.io.OutputStream inStream)
                            throws java.io.IOException
Throws:
java.io.IOException

BZip2CompressorOutputStream

public BZip2CompressorOutputStream(java.io.OutputStream inStream,
                                   int inBlockSize)
                            throws java.io.IOException
Throws:
java.io.IOException
Method Detail

hbMakeCodeLengths

protected static void hbMakeCodeLengths(char[] len,
                                        int[] freq,
                                        int alphaSize,
                                        int maxLen)

write

public void write(int bv)
           throws java.io.IOException
modified by Oliver Merkel, 010128

Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException