public interface BitStreamReader
extends java.io.Closeable
Modifier and Type | Method and Description |
---|---|
void |
alignTo(int alignVal)
Aligns the bit position according to the aligning value.
|
long |
getBitPosition()
Gets the current bit position.
|
long |
getBufferBitSize()
Gets size of the underlying buffer in bits.
|
int |
getBytePosition()
Gets the current byte position.
|
java.math.BigInteger |
readBigInteger(int numBits)
Reads the next unsigned Big Integer value with containing numBits bits.
|
BitBuffer |
readBitBuffer()
Reads a bit buffer from the bit stream.
|
long |
readBits(int numBits)
Reads the next numBits of the bit stream as long value.
|
boolean |
readBool()
Reads a Boolean value from the bit stream.
|
byte |
readByte()
Reads the next signed byte (8 bits).
|
byte[] |
readBytes()
Reads a Zserio bytes from the bit stream.
|
float |
readFloat16()
Reads the a float16 value from the bit stream.
|
float |
readFloat32()
Reads the a float32 value from the bit stream.
|
double |
readFloat64()
Reads the a float64 value from the bit stream.
|
int |
readInt()
Reads the next signed integer (32 bits).
|
long |
readLong()
Reads the next signed long (64 bits).
|
short |
readShort()
Reads the next signed short (16 bits).
|
java.math.BigInteger |
readSignedBigInteger(int numBits)
Reads the next signed big Integer value with containing numBits bits.
|
long |
readSignedBits(int numBits)
Reads the next numBits as signed bit value.
|
java.lang.String |
readString()
Reads a Zserio string from the bit stream assuming it is encoded in UTF-8.
|
short |
readUnsignedByte()
Reads the next unsigned byte (8 bits) as short value.
|
long |
readUnsignedInt()
Reads the next unsigned integer (32 bits) as long value.
|
int |
readUnsignedShort()
Read the next unsigned short (16 bits) as int value.
|
long |
readVarInt()
Reads a signed variable integer from the bit stream.
|
short |
readVarInt16()
Reads a variable 16 bit integer from the bit stream.
|
int |
readVarInt32()
Reads a variable 32 bit integer from the bit stream.
|
long |
readVarInt64()
Reads a variable 64 bit integer from the bit stream.
|
int |
readVarSize()
Reads a variable size integer from the bit stream.
|
java.math.BigInteger |
readVarUInt()
Reads an unsigned variable integer from the bit stream.
|
short |
readVarUInt16()
Reads an unsigned variable 16 bit integer from the bit stream.
|
int |
readVarUInt32()
Reads an unsigned variable 32 bit integer from the bit stream.
|
long |
readVarUInt64()
Reads an unsigned variable 64 bit integer from the bit stream.
|
void |
setBitPosition(long position)
Sets the bit position to the given value.
|
long readSignedBits(int numBits) throws java.io.IOException
numBits
- Number of bits to read.java.io.IOException
- If reading failed.long readBits(int numBits) throws java.io.IOException
numBits
- Number of bits to read.java.io.IOException
- If reading failed.byte readByte() throws java.io.IOException
java.io.IOException
- If reading failed.short readUnsignedByte() throws java.io.IOException
java.io.IOException
- If reading failed.short readShort() throws java.io.IOException
java.io.IOException
- If reading failed.int readUnsignedShort() throws java.io.IOException
java.io.IOException
- If reading failed.int readInt() throws java.io.IOException
java.io.IOException
- If reading failed.long readUnsignedInt() throws java.io.IOException
java.io.IOException
- If reading failed.long readLong() throws java.io.IOException
java.io.IOException
- If reading failed.java.math.BigInteger readBigInteger(int numBits) throws java.io.IOException
numBits
- Number of bits to read.java.io.IOException
- If reading failed.java.math.BigInteger readSignedBigInteger(int numBits) throws java.io.IOException
numBits
- Number of bits to read.java.io.IOException
- If reading failed.float readFloat16() throws java.io.IOException
java.io.IOException
- If reading failed.float readFloat32() throws java.io.IOException
java.io.IOException
- If reading failed.double readFloat64() throws java.io.IOException
java.io.IOException
- If reading failed.byte[] readBytes() throws java.io.IOException
java.io.IOException
- If reading failed.java.lang.String readString() throws java.io.IOException
java.io.IOException
- If reading failed.boolean readBool() throws java.io.IOException
java.io.IOException
- If reading failed.short readVarInt16() throws java.io.IOException
java.io.IOException
- If reading failed.int readVarInt32() throws java.io.IOException
java.io.IOException
- If reading failed.long readVarInt64() throws java.io.IOException
java.io.IOException
- If reading failed.short readVarUInt16() throws java.io.IOException
java.io.IOException
- If reading failed.int readVarUInt32() throws java.io.IOException
java.io.IOException
- If reading failed.long readVarUInt64() throws java.io.IOException
java.io.IOException
- If reading failed.long readVarInt() throws java.io.IOException
java.io.IOException
- If reading failed.java.math.BigInteger readVarUInt() throws java.io.IOException
java.io.IOException
- If reading failed.int readVarSize() throws java.io.IOException
java.io.IOException
- If reading failed.BitBuffer readBitBuffer() throws java.io.IOException
java.io.IOException
- If reading failed.long getBitPosition()
int getBytePosition()
void setBitPosition(long position) throws java.io.IOException
position
- Bit position counted from zero to set.java.io.IOException
- If the position cannot be set.void alignTo(int alignVal) throws java.io.IOException
alignVal
- An aligning value to use.java.io.IOException
- If the alignment failed.long getBufferBitSize()
Last updated 2024-12-05 10:34:50