Class Bit
java.lang.Object
org.apache.tika.parser.microsoft.onenote.fsshttpb.util.Bit
The class is used to read/set bit value for a byte array
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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.
-