private static String hex4 ( char c ) { char [ ] r = new char [ ] { ' ' , ' ' , ' ' , ' ' } ; int i = 3 ; while ( c > 0 ) { r [ i ] = HEX_DIGITS [ c & 0xF ] ; c >>>= 4 ; -- i ; } return new String ( r ) ; }
Converts the given character to a four - digit hexadecimal string