public class BitWriter extends Object
Constructor and Description |
---|
BitWriter(int bufferSize)
Initializes a new instance of the BitWriter class with specified buffer size in byte.
|
Modifier and Type | Method and Description |
---|---|
void |
appendGUID(UUID value)
Append a specified GUID value into the buffer.
|
void |
appendInit32(int value,
int length)
Append a specified Init32 type value into the buffer with the specified bit length.
|
void |
appendUInit32(int value,
int length)
Append a specified Unit32 type value into the buffer with the specified bit length.
|
void |
appendUInt64(long value,
int length)
Append a specified Unit64 type value into the buffer with the specified bit length.
|
List<Byte> |
getByteList() |
byte[] |
getBytes()
Gets a copy byte array which contains the current written byte.
|
public BitWriter(int bufferSize)
bufferSize
- Specify the buffer byte size.public byte[] getBytes() throws IOException
IOException
public List<Byte> getByteList() throws IOException
IOException
public void appendUInt64(long value, int length)
value
- Specify the value which needs to be appended.length
- Specify the bit length which the value will occupy in the buffer.public void appendUInit32(int value, int length)
value
- Specify the value which needs to be appended.length
- Specify the bit length which the value will occupy in the buffer.public void appendInit32(int value, int length)
value
- Specify the value which needs to be appended.length
- Specify the bit length which the value will occupy in the buffer.public void appendGUID(UUID value)
value
- Specify the GUID value.Copyright © 2007–1969 The Apache Software Foundation. All rights reserved.