title: How to get response length before reading response from socket in java
body: <p>I am working on MML server, my Task is to read response from MML server. In this case, there is no "End of Response" Character in response. How would i know that that response is ended? Is there any kind of technique to get response length before reading the response. by doing this i want to break my while loop using the response length.</p>
  
  <pre><code>while(true)
  {
      try
      {
         char temp = (char) is.read();
         System.out.println(temp);
         responseLine = responseLine + temp;
      }
      catch(Throwable e)
      {
          e.printStackTrace();
          break;
      }
  }
  </code></pre>