|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectInputStream
FilterInputStream
BitInputStream
public final class BitInputStream
This class is an input stream wrapper that can read a specific number of bytes and bits from an input stream.
| Field Summary |
|---|
| Fields inherited from class FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
BitInputStream(InputStream in)
Constructs a bit input stream from an InputStream object. |
|
| Method Summary | |
|---|---|
byte[] |
read(int length)
Read specific number of bytes from the input stream. |
int |
readSBits(int numBits)
Read a signed value from the given number of bits |
long |
readUBits(int numBits)
Read an unsigned value from the given number of bits. |
int |
readUI8()
Read an unsigned 8 bit value. |
int[] |
readUI8(int length)
Read specific number of unsigned bytes from the input stream. |
| Methods inherited from class FilterInputStream |
|---|
available, close, mark, markSupported, read, read, read, reset, skip |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BitInputStream(InputStream in)
in - input stream that will be wrapped| Method Detail |
|---|
public int readUI8()
throws IOException
IOException
public int[] readUI8(int length)
throws IOException
length - number of bytes to read and return as integers
IOException
public byte[] read(int length)
throws IOException
length - number of bytes to read
IOException
public long readUBits(int numBits)
throws IOException
numBits - number of bits used for the unsigned value
IOException
public int readSBits(int numBits)
throws IOException
numBits - number of bits used for the signed value
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||