public void writeString ( final String value ) { popName ( ) ; write ( StringPool . QUOTE ) ; int len = value . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { char c = value . charAt ( i ) ; switch ( c ) { case ' ' : write ( "\\\"" ) ; break ; case ' ' : write ( "\\\\" ) ; break ; case ' ' : if ( strictStringEncoding ) { write ( "\\/" ) ; } else { write ( c ) ; } break ; case ' ' : write ( "\\b" ) ; break ; case ' ' : write ( "\\f" ) ; break ; case ' ' : write ( "\\n" ) ; break ; case ' ' : write ( "\\r" ) ; break ; case ' ' : write ( "\\t" ) ; break ; default : if ( Character . isISOControl ( c ) ) { unicode ( c ) ; } else { write ( c ) ; } } } write ( StringPool . QUOTE ) ; }
Write a quoted and escaped value to the output .