|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
com.imagero.uio.io.BitInputStream
adds ability to read streams bitewise and also to read predefined amount of bits every read() call
| Field Summary |
| Fields inherited from class java.io.FilterInputStream |
in |
| Constructor Summary | |
BitInputStream(java.io.InputStream in)
|
|
| Method Summary | |
int |
getBitOffset()
|
int |
getBitsToRead()
how much bits is read every read() call (default - 8) |
boolean |
isInvertBitOrder()
|
void |
mark(int readlimit)
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
Reads data from input stream into an byte array. |
int |
read(int nbits)
|
void |
reset()
|
void |
resetBuffer()
empties bit buffer. |
void |
setBitsToRead(int bitsToRead)
set how much bits is read every read() call (max 8) |
void |
setInvertBitOrder(boolean invertBitOrder)
|
long |
skip(long n)
Skips some bytes from the input stream. |
int |
skipBits(int n)
|
int |
skipToByteBoundary()
|
| Methods inherited from class java.io.FilterInputStream |
available, close, markSupported |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BitInputStream(java.io.InputStream in)
| Method Detail |
public int getBitsToRead()
public void setBitsToRead(int bitsToRead)
bitsToRead - public boolean isInvertBitOrder()
public void setInvertBitOrder(boolean invertBitOrder)
public int read()
throws java.io.IOException
java.io.IOException
public int read(int nbits)
throws java.io.IOException
java.io.IOException
public int read(byte[] b)
throws java.io.IOException
java.io.IOException
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
b - the buffer into which the data is read.off - the start offset of the data.len - the maximum number of bytes read.
java.io.IOException - if an I/O error occurs.
java.lang.NullPointerException - if supplied byte array is nullpublic void resetBuffer()
public long skip(long n)
throws java.io.IOException
n - the number of bytes to be skipped.
java.io.IOException - if an I/O error occurs.
public int skipBits(int n)
throws java.io.IOException
n - bits to skip
java.io.IOException
public int skipToByteBoundary()
throws java.io.IOException
java.io.IOExceptionpublic int getBitOffset()
public void mark(int readlimit)
public void reset()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||