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

public class Bit extends Object
The class is used to read/set bit value for a byte array
  • Constructor Summary

    Constructors
    Constructor
    Description
    Bit()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    clearBit(byte[] array, long bit)
    Set a bit value to "Off" in the specified byte array with the specified bit position.
    static boolean
    isBitSet(byte[] array, long bit)
    Read a bit value from a byte array with the specified bit position.
    static void
    setBit(byte[] array, long bit)
    Set a bit value to "On" in the specified byte array with the specified bit position.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Bit

      public Bit()
  • Method Details

    • isBitSet

      public static boolean isBitSet(byte[] array, long bit)
      Read a bit value from a byte array with the specified bit position.
      Parameters:
      array - Specify the byte array.
      bit - Specify the bit position.
      Returns:
      Return the bit value in the specified bit position.
    • setBit

      public static void setBit(byte[] array, long bit)
      Set a bit value to "On" in the specified byte array with the specified bit position.
      Parameters:
      array - Specify the byte array.
      bit - Specify the bit position.
    • clearBit

      public static void clearBit(byte[] array, long bit)
      Set a bit value to "Off" in the specified byte array with the specified bit position.
      Parameters:
      array - Specify the byte array.
      bit - Specify the bit position.