Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.io
Class NBitOutputStream

    java.lang.Object
      org.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.3 $
Author:
  Ben Litchfield (ben@csh.rit.edu)

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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD