java.lang.Object
org.apache.tika.parser.microsoft.onenote.fsshttpb.util.BitWriter

public class BitWriter extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    BitWriter(int bufferSize)
    Initializes a new instance of the BitWriter class with specified buffer size in byte.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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[]
    Gets a copy byte array which contains the current written byte.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public byte[] getBytes() throws IOException
      Gets a copy byte array which contains the current written byte.
      Throws:
      IOException
    • getByteList

      public List<Byte> getByteList() throws IOException
      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

      public void appendGUID(UUID value)
      Append a specified GUID value into the buffer.
      Parameters:
      value - Specify the GUID value.