Class ByteOperator


  • public final class ByteOperator
    extends Object
    Provide a set of byte operations.
    • Method Detail

      • getBit

        public static boolean getBit​(byte value,
                                     int index)
        Obtains a specific bit value from a byte with given index number.
        Parameters:
        value - byte value
        index - index number
        Returns:
        a specific bit value from a byte
      • toBit

        public static byte toBit​(boolean value,
                                 int bit)
        Converts boolean value into bit.
        Parameters:
        value - boolean value
        bit - bit value
        Returns:
        converted bit value