public class BitInputStream extends Object
| Constructor and Description |
|---|
BitInputStream(InputStream inner)
Instantiates a new Bit input stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
availible()
Availible int.
|
void |
close()
Close.
|
void |
expect(Bits bits)
Expect.
|
<T extends Enum<T>> |
expect(Enum<T> expect)
Expect.
|
Bits |
peek(int bits)
Peek bits.
|
int |
peekIntCoord(int max)
Peek int coord int.
|
long |
peekLongCoord(long max)
Peek long coord long.
|
Bits |
read(int bits)
Read bits.
|
Bits |
readAhead()
Read ahead bits.
|
Bits |
readAhead(int bytes)
Read ahead bits.
|
boolean |
readBool()
Read bool boolean.
|
long |
readBoundedLong(long max)
Reads a single positive bounded integral value (up to 64-bit, including 0, excluding max)
|
char |
readChar()
Read char char.
|
long |
readVarLong()
Read var long long.
|
short |
readVarShort()
Read var short short.
|
short |
readVarShort(int optimal)
Read var short short.
|
static BitInputStream |
toBitStream(byte[] data)
To bit stream bit input stream.
|
public BitInputStream(InputStream inner)
inner - the innerpublic static BitInputStream toBitStream(byte[] data)
data - the datapublic void close()
throws IOException
IOException - the io exceptionpublic int availible()
throws IOException
IOException - the io exceptionpublic <T extends Enum<T>> void expect(Enum<T> expect) throws IOException
T - the type parameterexpect - the expectIOException - the io exceptionpublic void expect(Bits bits) throws IOException
bits - the bitsIOException - the io exceptionpublic Bits read(int bits) throws IOException
bits - the bitsIOException - the io exceptionpublic Bits peek(int bits) throws IOException
bits - the bitsIOException - the io exceptionpublic Bits readAhead() throws IOException
IOException - the io exceptionpublic Bits readAhead(int bytes) throws IOException
bytes - the bytesIOException - the io exceptionpublic boolean readBool()
throws IOException
IOException - the io exceptionpublic long readBoundedLong(long max)
throws IOException
max - Maximum value (exclusive)IOException - the io exceptionpublic long readVarLong()
throws IOException
IOException - the io exceptionpublic long peekLongCoord(long max)
throws IOException
max - the maxIOException - the io exceptionpublic int peekIntCoord(int max)
throws IOException
max - the maxIOException - the io exceptionpublic short readVarShort()
throws IOException
IOException - the io exceptionpublic short readVarShort(int optimal)
throws IOException
optimal - the optimalIOException - the io exceptionpublic char readChar()
throws IOException
IOException - the io exceptionCopyright © 2019 SimiaCryptus Software. All rights reserved.