code: static void writeString(FileWriter fw, String s) throws Exception
     {
        for (int i = 0; i < s.length(); i++)
        {
           fw.write((int)s.charAt(i));
        }
     }
docs: Write string
  @param fw The file writer
  @param s The string
  @exception Exception If an error occurs