title: How to convert an OutputStream into a string?
body: <p>This is my client code (J2ME):</p>
  
  <pre><code>SocketConnection sc = (SocketConnection) Connector.open("socket://localhost:4444");
  sc.openOutputStream().write("test".getBytes());
  sc.close();
  </code></pre>
  
  <p>And this is my server code (J2SE):</p>
  
  <pre><code>ServerSocket serverSocket = new ServerSocket(4444);
  Socket clientSocket = serverSocket.accept();
  OutputStream os = clientSocket.getOutputStream();
  </code></pre>
  
  <p>How would I go about creating a string representation of <code>os</code>?</p>