public static void escapeJavaScript(Writer out, String str) throws IOException {
        escapeJavaStyleString(out, str, true, true);
    }
public static void escapeJavaScript ( Writer out , String str ) throws IOException { escapeJavaStyleString ( out , str , true , true ) ; }
Escapes the characters in a <code>String</code> using JavaScript String rules
to a <code>Writer</code>.
<p>
A <code>null</code> string input has no effect.

@see #escapeJavaScript(java.lang.String)
@param out  Writer to write escaped string into
@param str  String to escape values in, may be null
@throws IllegalArgumentException if the Writer is <code>null</code>
@throws IOException if error occurs on underlying Writer