Class ResponseInputStream<ResponseT>

All Implemented Interfaces:
Closeable, AutoCloseable, Releasable, Abortable

public final class ResponseInputStream<ResponseT> extends SdkFilterInputStream implements Abortable
Input stream that provides access to the unmarshalled POJO response returned by the service in addition to the streamed contents. This input stream should be closed to release the underlying connection back to the connection pool.

If it is not desired to read remaining data from the stream, you can explicitly abort the connection via abort(). Note that this will close the underlying connection and require establishing an HTTP connection which may outweigh the cost of reading the additional data.

  • Constructor Details

  • Method Details

    • response

      public ResponseT response()
      Returns:
      The unmarshalled POJO response associated with this content.
    • abort

      public void abort()
      Description copied from interface: Abortable
      Aborts the execution of the task. Multiple calls to abort or calling abort an already aborted task should return without error.
      Specified by:
      abort in interface Abortable