code: private void log(char ch) throws IOException {
  		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("'\\\"'");
  		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);
  			log.write('\'');
  		} else {
  			log.write('\'');
  			log.write(ch);
  			log.write('\'');
  		}
  	}
docs: Writes a character, unicode escaping as needed.