Android Utililty Methods Byte Bit Set

List of utility methods to do Byte Bit Set

Description

The list of methods to do Byte Bit Set are organized into topic(s).

Method

booleanisBitSet(byte b, int bit)
is Bit Set
if (bit < 0 || bit >= 8)
    return false;
return (b & (1 << bit)) > 0;
bytesetBit(byte b, int bit)
set Bit
if (bit < 0 || bit >= 8)
    return b;
return (byte) (b | (1 << bit));