Class Bit
- 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
All Methods Static Methods Concrete Methods 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.
-
-
-
Method Detail
-
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.
-
-