public void set ( int bit , boolean value ) { int bite = byteForBit ( bit ) ; ensureSpace ( bite + 1 ) ; int bitOnByte = bitOnByte ( bit , bite ) ; if ( value ) { bits [ bite ] = byteBitSet ( bitOnByte , bits [ bite ] ) ; } else { bits [ bite ] = byteBitUnset ( bitOnByte , bits [ bite ] ) ; } }
Sets or unsets a bit . The smaller allowed bit is 0