Android JSON receive issue
<p>I have a string problem, I used the below code for recieving JSON data from an URL, the code is working fine, but the problem is I am not getting full data only half of the JSON values are coming, I would like to know whether there is reason for this, if so means how to solve this problem. JSON string is very big</p>

<pre><code>            DefaultHttpClient http_client = new DefaultHttpClient();
            HttpGet httpGet = new HttpGet(urls[0]);
            HttpResponse response = http_client.execute(httpGet);

            StatusLine statusLine = response.getStatusLine();
            int statusCode = statusLine.getStatusCode();
            HttpEntity entity = response.getEntity();

            InputStream in = entity.getContent();
            StringBuffer out = new StringBuffer();
            byte[] b = new byte[4096];
            int n =  in.read(b);
            while(n&gt;0){
                out.append(new String(b, 0, n));
                n = in.read(b);
            }

            String resultdata = out.toString();
            Log.d("Out data",resultdata);
</code></pre>
