public interface BitStreamWriter
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.
|
int |
getBytePosition()
Gets the current byte position.
|
void |
setBitPosition(long position)
Sets the bit position to the given value.
|
void |
writeBigInteger(java.math.BigInteger value,
int numBits)
Writes a given big integer value with the given number of bits to the underlying storage.
|
void |
writeBitBuffer(BitBuffer bitBuffer)
Writes a bit buffer to the underlying storage.
|
void |
writeBits(long value,
int numBits)
Writes the given value with the given number of unsigned bits to the underlying storage.
|
void |
writeBool(boolean value)
Writes a boolean value to the underlying storage.
|
void |
writeByte(byte value)
Writes a signed byte to the underlying storage.
|
void |
writeBytes(byte[] value)
Writes a Zserio bytes to the underlying storage.
|
void |
writeFloat16(float value)
Writes a 16-bit float value to the underlying storage.
|
void |
writeFloat32(float value)
Writes a 32-bit float value to the underlying storage.
|
void |
writeFloat64(double value)
Writes a 64-bit float value to the underlying storage.
|
void |
writeInt(int value)
Writes a signed integer to the underlying storage.
|
void |
writeLong(long value)
Writes a signed long to the underlying storage.
|
void |
writeShort(short value)
Writes a signed short to the underlying storage.
|
void |
writeSignedBits(long value,
int numBits)
Writes the given value with the given number of signed bits to the underlying storage.
|
void |
writeString(java.lang.String value)
Writes a Zserio string to the underlying storage in UTF-8 encoding.
|
void |
writeUnsignedByte(short value)
Writes an unsigned byte to the underlying storage.
|
void |
writeUnsignedInt(long value)
Writes an unsigned integer to the underlying storage.
|
void |
writeUnsignedShort(int value)
Writes an unsigned short to the underlying storage.
|
void |
writeVarInt(long value)
Writes a variable signed integer value to the underlying storage.
|
void |
writeVarInt16(short value)
Writes a variable 16 bit integer value to the underlying storage.
|
void |
writeVarInt32(int value)
Writes a variable 32 bit integer value to the underlying storage.
|
void |
writeVarInt64(long value)
Writes a variable 64 bit integer value to the underlying storage.
|
void |
writeVarSize(int value)
Writes a variable size integer value to the underlying storage.
|
void |
writeVarUInt(java.math.BigInteger value)
Writes a variable unsigned integer value to the underlying storage.
|
void |
writeVarUInt16(short value)
Writes a variable 16 bit unsigned integer value to the underlying storage.
|
void |
writeVarUInt32(int value)
Writes a variable 32 bit unsigned integer value to the underlying storage.
|
void |
writeVarUInt64(long value)
Writes a variable 64 bit unsigned integer value to the underlying storage.
|
void writeSignedBits(long value, int numBits) throws java.io.IOException
value
- Value to write.numBits
- Number of bits for the value to write.java.io.IOException
- If the writing failed.void writeBits(long value, int numBits) throws java.io.IOException
value
- Value to write.numBits
- Number of bits for the value to write.java.io.IOException
- If the writing failed.void writeByte(byte value) throws java.io.IOException
value
- Signed byte value to write.java.io.IOException
- If the writing failed.void writeUnsignedByte(short value) throws java.io.IOException
value
- Unsigned byte value to write.java.io.IOException
- If the writing failed.void writeShort(short value) throws java.io.IOException
value
- Signed short value to write.java.io.IOException
- If the writing failed.void writeUnsignedShort(int value) throws java.io.IOException
value
- Unsigned short value to write.java.io.IOException
- If the writing failed.void writeInt(int value) throws java.io.IOException
value
- Signed integer value to write.java.io.IOException
- If the writing failed.void writeUnsignedInt(long value) throws java.io.IOException
value
- Unsigned integer value to write.java.io.IOException
- If the writing failed.void writeLong(long value) throws java.io.IOException
value
- Signed integer value to write.java.io.IOException
- If the writing failed.void writeBigInteger(java.math.BigInteger value, int numBits) throws java.io.IOException
value
- Big integer value to write.numBits
- Number of bits for the value to write.java.io.IOException
- If the writing failed.void writeFloat16(float value) throws java.io.IOException
value
- Half precision float value to write.java.io.IOException
- If the writing failed.void writeFloat32(float value) throws java.io.IOException
value
- Single precision float value to write.java.io.IOException
- If the writing failed.void writeFloat64(double value) throws java.io.IOException
value
- Double precision float value to write.java.io.IOException
- If the writing failed.void writeBytes(byte[] value) throws java.io.IOException
value
- Zserio bytes to write.java.io.IOException
- If the writing failed.void writeString(java.lang.String value) throws java.io.IOException
value
- Zserio string to write.java.io.IOException
- If the writing failed.void writeBool(boolean value) throws java.io.IOException
value
- Boolean value to write.java.io.IOException
- If the writing failed.void writeVarInt16(short value) throws java.io.IOException
value
- Variable 17 bit integer value to write.java.io.IOException
- If the writing failed.void writeVarUInt16(short value) throws java.io.IOException
value
- Variable 16 bit unsigned integer value to write.java.io.IOException
- If the writing failed.void writeVarInt32(int value) throws java.io.IOException
value
- Variable 32 bit integer value to write.java.io.IOException
- If the writing failed.void writeVarUInt32(int value) throws java.io.IOException
value
- Variable 32 bit unsigned integer value to write.java.io.IOException
- If the writing failed.void writeVarInt64(long value) throws java.io.IOException
value
- Variable 64 bit integer value to write.java.io.IOException
- If the writing failed.void writeVarUInt64(long value) throws java.io.IOException
value
- Variable 64 bit unsigned integer value to write.java.io.IOException
- If the writing failed.void writeVarInt(long value) throws java.io.IOException
value
- Variable signed integer value to write.java.io.IOException
- If the writing failed.void writeVarUInt(java.math.BigInteger value) throws java.io.IOException
value
- Variable unsigned integer value to write.java.io.IOException
- If the writing failed.void writeVarSize(int value) throws java.io.IOException
value
- Variable size integer value to write.java.io.IOException
- If the writing failed.void writeBitBuffer(BitBuffer bitBuffer) throws java.io.IOException
bitBuffer
- Bit buffer to write.java.io.IOException
- If the writing 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.Last updated 2024-12-05 10:34:50