protected void writeString(String s) throws IOException {
  for (int i=0; i < s.length(); i++) {
    out.write((byte)s.charAt(i));
  }
}

protected void writeString ( String s ) throws IOException { for ( int i = 0 ; i < s . length ( ) ; i ++ ) { out . write ( ( byte ) s . charAt ( i ) ) ; } }
writes string to output stream
