public void writeString(String s,Encoding encoding) throws IOException {
  if (encoding != null) {
    byte[] buffer=encoding.encodeToCharset(s);
    writeBuffer(buffer);
  }
 else {
    writeBuffer(s.getBytes());
  }
}

public void writeString ( String s , Encoding encoding ) throws IOException { if ( encoding != null ) { byte [ ] buffer = encoding . encodeToCharset ( s ) ; writeBuffer ( buffer ) ; } else { writeBuffer ( s . getBytes ( ) ) ; } }
write content of the specified string using the specified encoding .
