org.apache.tools.bzip2

Class CBZip2OutputStream

Implemented Interfaces:
BZip2Constants

public class CBZip2OutputStream
extends OutputStream
implements BZip2Constants

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

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.apache.tools.bzip2.BZip2Constants

G_SIZE, MAX_ALPHA_SIZE, MAX_CODE_LEN, MAX_SELECTORS, NUM_OVERSHOOT_BYTES, N_GROUPS, N_ITERS, RUNA, RUNB, baseBlockSize, rNums

Constructor Summary

CBZip2OutputStream(OutputStream inStream)
CBZip2OutputStream(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

Field Details

CLEARMASK

protected static final int CLEARMASK
Field Value:
-2097153

DEPTH_THRESH

protected static final int DEPTH_THRESH
Field Value:
10

GREATER_ICOST

protected static final int GREATER_ICOST
Field Value:
15

LESSER_ICOST

protected static final int LESSER_ICOST
Field Value:
0

QSORT_STACK_SIZE

protected static final int QSORT_STACK_SIZE
Field Value:
1000

SETMASK

protected static final int SETMASK
Field Value:
2097152

SMALL_THRESH

protected static final int SMALL_THRESH
Field Value:
20

Constructor Details

CBZip2OutputStream

public CBZip2OutputStream(OutputStream inStream)
            throws IOException

CBZip2OutputStream

public CBZip2OutputStream(OutputStream inStream,
                          int inBlockSize)
            throws IOException

Method Details

close

public void close()
            throws IOException

finalize

protected void finalize()
            throws Throwable

flush

public void flush()
            throws IOException

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

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.