code: public void set(long index) throws IOException {
          long pos = index >> 3;
          try {
              lock().acquireUpgradableLock();
              int value = mFile.read(pos);
              int newValue;
              if (value <= 0) {
                  newValue = (0x00000080 >> (index & 7));
              }
              else {
                  newValue = value | (0x00000080 >> (index & 7));
              }
              if (newValue != value) {
                  mFile.write(pos, newValue);
              }
          }
          catch (InterruptedException e) {
              throw new InterruptedIOException();
          }
          finally {
              lock().releaseLock();
          }
      }
docs: Set the bit at the given index to one.