Class AbortableInputStreamSubscriber
- java.lang.Object
- 
- java.io.InputStream
- 
- software.amazon.awssdk.http.async.AbortableInputStreamSubscriber
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- org.reactivestreams.Subscriber<ByteBuffer>,- Abortable
 
 public final class AbortableInputStreamSubscriber extends InputStream implements org.reactivestreams.Subscriber<ByteBuffer>, Abortable Wrapper ofInputStreamSubscriberthat also implementsAbortable. It will invokeclose()whenabort()is invoked. Upon closing, the underlyingInputStreamSubscriberwill be closed, and additional action can be added viaAbortableInputStreamSubscriber.Builder.doAfterClose(Runnable).
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classAbortableInputStreamSubscriber.Builder
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Aborts the execution of the task.static AbortableInputStreamSubscriber.Builderbuilder()voidclose()voidonComplete()voidonError(Throwable t)voidonNext(ByteBuffer byteBuffer)voidonSubscribe(org.reactivestreams.Subscription s)intread()intread(byte[] b)intread(byte[] b, int off, int len)- 
Methods inherited from class java.io.InputStreamavailable, mark, markSupported, reset, skip
 
- 
 
- 
- 
- 
Method Detail- 
builderpublic static AbortableInputStreamSubscriber.Builder builder() 
 - 
abortpublic void abort() Description copied from interface:AbortableAborts the execution of the task. Multiple calls to abort or calling abort an already aborted task should return without error.
 - 
readpublic int read() throws IOException- Specified by:
- readin class- InputStream
- Throws:
- IOException
 
 - 
readpublic int read(byte[] b, int off, int len) throws IOException- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
 - 
readpublic int read(byte[] b) throws IOException- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
 - 
onSubscribepublic void onSubscribe(org.reactivestreams.Subscription s) - Specified by:
- onSubscribein interface- org.reactivestreams.Subscriber<ByteBuffer>
 
 - 
onNextpublic void onNext(ByteBuffer byteBuffer) - Specified by:
- onNextin interface- org.reactivestreams.Subscriber<ByteBuffer>
 
 - 
onErrorpublic void onError(Throwable t) - Specified by:
- onErrorin interface- org.reactivestreams.Subscriber<ByteBuffer>
 
 - 
onCompletepublic void onComplete() - Specified by:
- onCompletein interface- org.reactivestreams.Subscriber<ByteBuffer>
 
 - 
closepublic void close() - Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
 
 
- 
 
-