static String toHex ( int n ) { if ( n < 0x10000 ) return "<" + toHex4 ( n ) + ">" ; n -= 0x10000 ; int high = ( n / 0x400 ) + 0xd800 ; int low = ( n % 0x400 ) + 0xdc00 ; return "[<" + toHex4 ( high ) + toHex4 ( low ) + ">]" ; }
Gets an hex string in the format &lt ; HHHH&gt ; .