protected static void writeQuotedStringValue(ByteArrayOutputStream out,byte[] buf){
  int len=buf.length;
  byte ch;
  for (int i=0; i < len; i++) {
    ch=buf[i];
    if (needEscape((char)ch)) {
      out.write('\\');
    }
    out.write(ch);
  }
}

protected static void writeQuotedStringValue ( ByteArrayOutputStream out , byte [ ] buf ) { int len = buf . length ; byte ch ; for ( int i = 0 ; i < len ; i ++ ) { ch = buf [ i ] ; if ( needEscape ( ( char ) ch ) ) { out . write ( '\\' ) ; } out . write ( ch ) ; } }
checks if a byte [ ] contains characters that must be quoted and write the resulting , possibly escaped , characters to out .
