title: Converting InputStreamReader into String
body: <p>Is there a better way to read Strings from an InputStreamReader.
  In the Profiler im am getting a memory heap there.</p>
  
  <pre><code>public String getClientMessage() throws IOException {
      BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(tempSocket.getInputStream()));     
      char[] buffer = new char[200];
      return new String(buffer, 0, bufferedReader.read(buffer));
  }
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT:
  <img src="https://i.stack.imgur.com/bFoXU.png" alt="enter image description here"></p>
  
  <p>EDIT:
  Messages are sent with this:</p>
  
  <pre><code>public void sendServerMessage(String action) throws IOException{
      PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(tempSocket.getOutputStream()));
      printWriter.print(action);
      printWriter.flush();
  }
  </code></pre>