title: IllegalStateException: Content has been consumed
body: <pre><code>class VideoUploadTask extends AsyncTask&lt;Void, Void, String&gt; {
      @Override
      protected String doInBackground(Void... unsued) {
          try {
              Log.i("VideoUploadTask", "enters");
  
              HttpClient httpClient = new DefaultHttpClient();
              HttpContext localContext = new BasicHttpContext();
              HttpPost httpPost = new HttpPost(
                  "http://192.168.5.10/ijoomer_development/index.php?option=com_ijoomer&amp;plg_name=jomsocial&amp;pview=album&amp;ptask=upload_video&amp;session_id="+ConstantData.session_id +"");
              MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
              ByteArrayOutputStream bos = new ByteArrayOutputStream();
              // bitmap.compress(CompressFormat.JPEG, 100, bos);
              byte[] data = bos.toByteArray();
              Log.i("categoryId in vedio upload2", ""+ConstantData.categoryId);
              entity.addPart("categoryId", new StringBody(ConstantData.categoryId.toString()));
              entity.addPart("video", new ByteArrayBody(data, "myvideo.mp4"));
              /*
               * entity.addPart("photoCaption", new
               * StringBody(caption.getText() .toString()));
               */
              httpPost.setEntity(entity);
              HttpResponse response = httpClient.execute(httpPost,localContext);
              InputStream in = response.getEntity().getContent();
              BufferedReader reader = new BufferedReader(
                      new InputStreamReader(
                              response.getEntity().getContent(), "UTF-8"));
  
              String sResponse = reader.readLine();
  
              String strResponse = convertStreamToString(in);
              System.out.println(strResponse);
              if (dialog.isShowing())
                  dialog.dismiss();
  
              return strResponse;
  
          } catch (Exception e) {
              if (dialog.isShowing())
                  dialog.dismiss();
              // Toast.makeText(getApplicationContext(),"Exception Image",Toast.LENGTH_LONG).show();
              Log.e(e.getClass().getName(), e.getMessage(), e);
              return null;
          }
  
          // (null);
      }
  </code></pre>
  
  <p>getting error <strong>IllegalStateException: Content has been consumed</strong> in log cat.what is the problem i m not able to find.Please help me to correct this error.</p>
  
  <p>Problem of <strong>IllegalStateException: Content has been consumed</strong> has been solved. But by this coding i am not able to upload the video. Please give me some suggestion.</p>