java.net.socketexception bad file number
<p>I am making an android application using wamp server and php as web service..I am able to get response from php. but when i try to convert the inputstream to string it shows java.net.socketexception bad file number. What type of error is this and what is the reason for this? Any help would be appreciated..</p>

<pre><code>class query2 extends AsyncTask&lt;String, String, Void&gt;
  {
     private ProgressDialog progressDialog = new ProgressDialog(FacDetails.this);
     InputStream is = null ;
     String result = "";
     protected void onPreExecute() {
        progressDialog.setMessage("Authenticating...");
        progressDialog.show();
        progressDialog.setOnCancelListener(new OnCancelListener() {
    public void onCancel(DialogInterface arg0) {
        query2.this.cancel(true);
       }
    });
      }
     @Override
     protected Void doInBackground(String... params) {
     String url_select = "http://192.168.0.1/query2.php";
     System.out.println("hello");
     httpclient = new DefaultHttpClient();
     HttpPost httpPost = new HttpPost(url_select);

         ArrayList&lt;NameValuePair&gt; nameValuePairs3 = new ArrayList&lt;NameValuePair&gt;();
         nameValuePairs3.add(new BasicNameValuePair("regno",id));
        try {
        //httpPost.setEntity(new UrlEncodedFormEntity(param));
            httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs3));
        HttpResponse httpResponse = httpclient.execute(httpPost);
            ResponseHandler&lt;String&gt; responseHandler = new BasicResponseHandler();
        final String response = httpclient.execute(httpPost, responseHandler);
            System.out.println(response);
        HttpEntity httpEntity = httpResponse.getEntity();
        //read content
        is =  httpEntity.getContent();                  
        //httpclient.getConnectionManager().shutdown();
        } catch (Exception e) {
          Log.e("log_tag", "Error in http connection "+e.toString());
        }
    try {
        //
        //BufferedReader br = new BufferedReader(new InputStreamReader(is,"UTF-8"));

        BufferedReader br = new BufferedReader(new InputStreamReader(
                                     is, "iso-8859-1"), 32);

        StringBuilder sb = new StringBuilder();
        String line = "";
        System.out.println("a");
        while((line=br.readLine())!=null)
        {
           sb.append(line+"\n");
        }

        is.close();
        result=sb.toString();
        } catch (Exception e) {
        // TODO: handle exception
            Log.e("log_tag", "Error converting result "+e.toString());
        }
        return null;
    }
    protected void onPostExecute(Void v) {
       try{
         JSONArray jArray = new JSONArray(result);

             JSONObject json_data=null;

             json_data = jArray.getJSONObject(0); 

            for(int i=0;i&lt;jArray.length();i++)
             {
             json_data=jArray.getJSONObject(i);
             for(int j=0;j&lt;lengthid;j++)
             {
                 String x=ansh[j];
                 details[i][j]=json_data.getString(x);
             }
              }
       }catch(JSONException e){
             Log.e("log_tag", "Error parsing data "+e.toString());
          }
     }
</code></pre>
