org.pdfbox.io

Class NBitOutputStream


public class NBitOutputStream
extends java.lang.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.

Constructor Details

NBitOutputStream

public NBitOutputStream(OutputStream os)
Constructor.
Parameters:
os - The output stream to write to.

Method Details

close

public void close()
            throws IOException
This will close 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.

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.