Class BitWriter
java.lang.Object
org.apache.tika.parser.microsoft.onenote.fsshttpb.util.BitWriter
-
Constructor Summary
ConstructorDescriptionBitWriter
(int bufferSize) Initializes a new instance of the BitWriter class with specified buffer size in byte. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.byte[]
getBytes()
Gets a copy byte array which contains the current written byte.
-
Constructor Details
-
BitWriter
public BitWriter(int bufferSize) Initializes a new instance of the BitWriter class with specified buffer size in byte.- Parameters:
bufferSize
- Specify the buffer byte size.
-
-
Method Details
-
getBytes
Gets a copy byte array which contains the current written byte.- Throws:
IOException
-
getByteList
- Throws:
IOException
-
appendUInt64
public void appendUInt64(long value, int length) Append a specified Unit64 type value into the buffer with the specified bit length.- Parameters:
value
- Specify the value which needs to be appended.length
- Specify the bit length which the value will occupy in the buffer.
-
appendUInit32
public void appendUInit32(int value, int length) Append a specified Unit32 type value into the buffer with the specified bit length.- Parameters:
value
- Specify the value which needs to be appended.length
- Specify the bit length which the value will occupy in the buffer.
-
appendInit32
public void appendInit32(int value, int length) Append a specified Init32 type value into the buffer with the specified bit length.- Parameters:
value
- Specify the value which needs to be appended.length
- Specify the bit length which the value will occupy in the buffer.
-
appendGUID
Append a specified GUID value into the buffer.- Parameters:
value
- Specify the GUID value.
-