private void log(String value) throws IOException {
		if(value==null) {
			log.write("(String)null");
		} else {
			log.write('"');
			for(int i=0, len=value.length(); i<len; i++) {
				char ch = value.charAt(i);
				if(ch=='\t') log.write("\\t");
				else if(ch=='\b') log.write("\\b");
				else if(ch=='\n') log.write("\\n");
				else if(ch=='\r') log.write("\\r");
				else if(ch=='\f') log.write("\\f");
				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('0');
					log.write(hex);
				} else {
					log.write(ch);
				}
			}
			log.write('"');
		}
	}
private void log(String value) throws IOException {
		if(value==null) {
			log.write("(String)null");
		} else {
			log.write('"');
			for(int i=0, len=value.length(); i<len; i++) {
				char ch = value.charAt(i);
				if(ch=='\t') log.write("\\t");
				else if(ch=='\b') log.write("\\b");
				else if(ch=='\n') log.write("\\n");
				else if(ch=='\r') log.write("\\r");
				else if(ch=='\f') log.write("\\f");
				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('0');
					log.write(hex);
				} else {
					log.write(ch);
				}
			}
			log.write('"');
		}
	}
private void log ( String value ) throws IOException { if ( value == null ) { log . write ( "(String)null" ) ; } else { log . write ( ' ' ) ; for ( int i = 0 , len = value . length ( ) ; i < len ; i ++ ) { char ch = value . charAt ( i ) ; 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 ( "\\u" ) ; String hex = Integer . toHexString ( ch ) ; for ( int l = hex . length ( ) ; l < 4 ; l ++ ) log . write ( ' ' ) ; log . write ( hex ) ; } else { log . write ( ch ) ; } } log . write ( ' ' ) ; } }
Writes a String, unicode escaping as needed.
Writes a String unicode escaping as needed .