org.apache.pdfbox.io
Class NBitOutputStream

java.lang.Object
  extended by org.apache.pdfbox.io.NBitOutputStream

public class NBitOutputStream
extends Object

This is an n-bit output stream. This means that you write data in n-bit chunks.

Version:
$Revision: 1.4 $
Author:
Ben Litchfield

Constructor Summary
NBitOutputStream(OutputStream os)
          Constructor.
 
Method Summary
 void close()
          This will close the stream.
 int getBitsInChunk()
          Getter for property bitsToRead.
 void setBitsInChunk(int bitsInChunkValue)
          Setter for property bitsToRead.
 void write(long chunk)
          This will write the next n-bits to the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NBitOutputStream

public NBitOutputStream(OutputStream os)
Constructor.

Parameters:
os - The output stream to write to.
Method Detail

write

public void write(long chunk)
           throws IOException
This will write the next n-bits to the stream.

Parameters:
chunk - The next chunk of data to write.
Throws:
IOException - If there is an error writing the chunk.

close

public void close()
           throws IOException
This will close the stream.

Throws:
IOException - if there is an error closing the stream.

getBitsInChunk

public int getBitsInChunk()
Getter for property bitsToRead.

Returns:
Value of property bitsToRead.

setBitsInChunk

public void setBitsInChunk(int bitsInChunkValue)
Setter for property bitsToRead.

Parameters:
bitsInChunkValue - New value of property bitsToRead.


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.