question: public static void appendHexJavaScriptRepresentation ( StringBuilder sb , char c ) { sb . append ( "\\u" ) ; String val = Integer . toHexString ( c ) ; for ( int j = val . length ( ) ; j < 4 ; j ++ ) { sb . append ( '0' ) ; } sb . append ( val ) ; }
target:  Returns a javascript representation of the character in a hex escaped format. Although this is a rather specific method, it is made public because it is also used by the JSCompiler.