title: how to write string with outputstream(Telnet client) using java
body: <p>i tried to use this code but when i start the connection it seems that the server doesn't receive the string(the command):</p>
  
  <pre><code>public static void sendMessage(TelnetClient s, String myMessageString)
         throws IOException {
        OutputStream os = s.getOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(os);  
        oos.writeObject(myMessageString); 
        }
  </code></pre>
  
  <p>i tried also to use only the outputstream and to do the following thing:</p>
  
  <pre><code>os.write(myMessageString.getbytes());
  </code></pre>