com.itextpdf.text.pdf.codec
Class BitFile

java.lang.Object
  extended by com.itextpdf.text.pdf.codec.BitFile

public class BitFile
extends Object

Came from GIFEncoder initially. Modified - to allow for output compressed data without the block counts which breakup the compressed data stream for GIF.

Since:
5.0.2

Field Summary
(package private)  int bitsLeft_
           
(package private)  boolean blocks_
          note this also indicates gif format BITFile.
(package private)  byte[] buffer_
           
(package private)  int index_
           
(package private)  OutputStream output_
           
 
Constructor Summary
BitFile(OutputStream output, boolean blocks)
           
 
Method Summary
 void flush()
           
 void writeBits(int bits, int numbits)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

output_

OutputStream output_

buffer_

byte[] buffer_

index_

int index_

bitsLeft_

int bitsLeft_

blocks_

boolean blocks_
note this also indicates gif format BITFile.

Constructor Detail

BitFile

public BitFile(OutputStream output,
               boolean blocks)
Parameters:
output - destination for output data
blocks - GIF LZW requires block counts for output data
Method Detail

flush

public void flush()
           throws IOException
Throws:
IOException

writeBits

public void writeBits(int bits,
                      int numbits)
               throws IOException
Throws:
IOException

Hosted by openminds