public boolean set(long index) {
    if (!(index < size))
      throw new IndexOutOfBoundsException();
    if (!get(index)) {
      bytes.writeLong(offset(index), bytes.readLong(offset(index)) | (1l << position(index)));
      count++;
      return true;
    }
    return false;
  }
public boolean set ( long index ) { if ( ! ( index < size ) ) throw new IndexOutOfBoundsException ( ) ; if ( ! get ( index ) ) { bytes . writeLong ( offset ( index ) , bytes . readLong ( offset ( index ) ) | ( 1l << position ( index ) ) ) ; count ++ ; return true ; } return false ; }
Sets the bit at the given index.

@param index The index of the bit to set.
@return Indicates if the bit was changed.