basic-lib/src/main/java/com/streamsets/pipeline/stage/origin/http/HttpClientSource.java
private void cleanupResponse(InputStream in) throws IOException {
    IOException ex = null;

    LOG.debug("Cleanup after request processing complete.");
    lastRequestCompletedTime = System.currentTimeMillis();

    if (in != null) {
      try {
        in.close();
      } catch(IOException e) {
        LOG.warn("Error closing input stream", ex);
        ex = e;
      }
    }

    getResponse().close();
    setResponse(null);

    try {
      parser.close();
    } catch(IOException e) {
      LOG.warn("Error closing parser", ex);
      ex = e;
    }
    parser = null;

    if(ex != null) {
      throw ex;
    }
  }
private void cleanupResponse(InputStream in) throws IOException {
    IOException ex = null;

    LOG.debug("Cleanup after request processing complete.");
    lastRequestCompletedTime = System.currentTimeMillis();

    if (in != null) {
      try {
        in.close();
      } catch(IOException e) {
        LOG.warn("Error closing input stream", ex);
        ex = e;
      }
    }

    getResponse().close();
    setResponse(null);

    try {
      parser.close();
    } catch(IOException e) {
      LOG.warn("Error closing parser", ex);
      ex = e;
    }
    parser = null;

    if(ex != null) {
      throw ex;
    }
  }
Cleanup the {@link DataParser}, response's {@link InputStream} and the {@link Response} itself.
@param in the InputStream we are finished with
@throws IOException If a resource is not closed properly