Class MonitoredHttpResponseContentInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

final class MonitoredHttpResponseContentInputStream extends MonitorInputStream
An InputStream that cleans up the org.apache.http.client.methods.CloseableHttpResponse on close.
  • Field Details

    • httpResponse

      private final org.apache.http.HttpResponse httpResponse
  • Constructor Details

    • MonitoredHttpResponseContentInputStream

      public MonitoredHttpResponseContentInputStream(org.apache.http.HttpResponse httpResponse) throws IOException
      Throws:
      IOException
    • MonitoredHttpResponseContentInputStream

      public MonitoredHttpResponseContentInputStream(org.apache.http.HttpResponse httpResponse, int bufferSize) throws IOException
      Throws:
      IOException
  • Method Details

    • closeSuper

      protected void closeSuper() throws IOException
      Prevent closing the stream itself if the httpResponse is closeable. Closing the stream may consume all remaining data no matter how large (VFS-805).
      Overrides:
      closeSuper in class MonitorInputStream
      Throws:
      IOException - if an IO error occurs.
    • onClose

      protected void onClose() throws IOException
      Description copied from class: MonitorInputStream
      Called after the stream has been closed. This implementation does nothing.
      Overrides:
      onClose in class MonitorInputStream
      Throws:
      IOException - if an error occurs.