private void log ( char ch ) throws IOException { if ( ch == ' ' ) log . write ( "'\\t'" ) ; else if ( ch == ' ' ) log . write ( "'\\b'" ) ; else if ( ch == ' ' ) log . write ( "'\\n'" ) ; else if ( ch == ' ' ) log . write ( "'\\r'" ) ; else if ( ch == ' ' ) log . write ( "'\\f'" ) ; else if ( ch == ' ' ) log . write ( "'\\'" ) ; else if ( ch == ' ' ) log . write ( "'\\\\'" ) ; else if ( ch == ' ' ) log . write ( "'\\\"'" ) ; else if ( ch < ' ' ) { log . write ( "'\\u" ) ; String hex = Integer . toHexString ( ch ) ; for ( int l = hex . length ( ) ; l < 4 ; l ++ ) log . write ( ' ' ) ; log . write ( hex ) ; log . write ( ' ' ) ; } else { log . write ( ' ' ) ; log . write ( ch ) ; log . write ( ' ' ) ; } }
Writes a character unicode escaping as needed .