public boolean isSet ( int bit ) { int bite = byteForBit ( bit ) ; if ( bite >= bits . length || bits . length == 0 ) { return false ; } int bitOnByte = bitOnByte ( bit , bite ) ; return ( ( 1 << bitOnByte ) & bits [ bite ] ) != 0 ; }
Returns the value of a given bit . False is returned for unexisting bits .