checkBit method

bool checkBit(
  1. int position,
  2. int mask
)

Implementation

bool checkBit(int position, int mask) {
  if (position < _byteBuffer.length) {
    seek(position);
    int current = readUnsignedByte();
    return (current & mask) == mask;
  } else {
    return false;
  }
}