private void handleResponse(HttpResponse response) {
    StatusLine status = response.getStatusLine();
    if (status.getStatusCode() >= 300) {
      String errorMsg = "response status error code:" + status.getStatusCode();
      if (status.getStatusCode() == 416 && isResume) {
        errorMsg += " \n maybe you have download complete.";
      }
      publishProgress(
          UPDATE_FAILURE,
          new HttpResponseException(status.getStatusCode(), status.getReasonPhrase()),
          status.getStatusCode(),
          errorMsg);
    } else {
      try {
        HttpEntity entity = response.getEntity();
        Object responseBody = null;
        if (entity != null) {
          time = SystemClock.uptimeMillis();
          if (targetUrl != null) {
            responseBody = mFileEntityHandler.handleEntity(entity, this, targetUrl, isResume);
          } else {
            responseBody = mStrEntityHandler.handleEntity(entity, this, charset);
          }
        }
        publishProgress(UPDATE_SUCCESS, responseBody);

      } catch (IOException e) {
        publishProgress(UPDATE_FAILURE, e, 0, e.getMessage());
      }
    }
  }
 /**
  * 停止下载任务
  *
  * @param
  */
 public void stop() {
   mFileEntityHandler.setStop(true);
 }
 public boolean isStop() {
   return mFileEntityHandler.isStop();
 }