|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pdfbox.io.NBitInputStream
public class NBitInputStream
This is an n-bit input stream. This means that you can read chunks of data as any number of bits, not just 8 bits like the regular input stream. Just set the number of bits that you would like to read on each call. The default is 8.
Constructor Summary | |
---|---|
NBitInputStream(InputStream is)
Constructor. |
Method Summary | |
---|---|
int |
getBitsInChunk()
Getter for property bitsToRead. |
long |
read()
This will read the next n bits from the stream and return the unsigned value of those bits. |
void |
setBitsInChunk(int bitsInChunkValue)
Setter for property bitsToRead. |
void |
unread(long data)
This will unread some data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NBitInputStream(InputStream is)
is
- The input stream to read from.Method Detail |
---|
public void unread(long data)
data
- The data to put back into the stream.public long read() throws IOException
IOException
- If there is an error reading from the underlying stream.public int getBitsInChunk()
public void setBitsInChunk(int bitsInChunkValue)
bitsInChunkValue
- New value of property bitsToRead.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |