SET PACKET LIMIT HTTP
<p>I am calling a URL and getting the things from output stream as text. Some time due to exception happening in thirdparty URL they are sending me the complete HTML page . So how can i check the response get from them is not  a HTML page. Is there any possible way to set the limit of the http packets getting in the response?Am expecting a string of length less than 500 but if it is a html page its more than 5000. I dont want to check the string length . I want to get some other solution. Am using <code>import java.net.URL</code> and <code>import java.net.URLConnection</code> for getting the URL connection.</p>
