setBit method

void setBit(
  1. int position,
  2. int maskToSet
)

Implementation

void setBit(int position, int maskToSet) {
  if (position < _byteBuffer.length) {
    // Set the value now
    seek(position);
    int current = readUnsignedByte();
    seek(position);
    current |= maskToSet;
    writeUnsignedByte(current);
  }
}