code: private void simpleWriteString(String outString, OutputStream outStream) throws IOException
     {
        for (int i = 0; i < outString.length(); i++)
        {
           int charCode = outString.charAt(i);
           outStream.write(charCode & 0xFF);
           outStream.write((charCode >> 8) & 0xFF);
        }
     }
docs: Writes string into stream.
  
  @param outString string
  @param outStream stream
  @throws IOException {@link IOException}