private static char [ ] _toCharBitArray ( final long pvalue , final int size ) { long value = pvalue ; final char bits [ ] = new char [ size ] ; // Convert each bit from right to left. for ( int i = size - 1 ; i >= 0 ; -- i ) { bits [ i ] = ( value & 1 ) == 0 ? ' ' : ' ' ; value >>>= 1 ; } return bits ; }
Convert a long value into a character array of 0 and 1 that represents the value in base 2 .