public final class AbortableInputStreamSubscriber extends InputStream implements org.reactivestreams.Subscriber<ByteBuffer>, Abortable
InputStreamSubscriber that also implements Abortable. It will invoke close()
when abort() is invoked. Upon closing, the underlying InputStreamSubscriber will be closed, and additional
action can be added via AbortableInputStreamSubscriber.Builder.doAfterClose(Runnable).| Modifier and Type | Class and Description |
|---|---|
static class |
AbortableInputStreamSubscriber.Builder |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Aborts the execution of the task.
|
static AbortableInputStreamSubscriber.Builder |
builder() |
void |
close() |
void |
onComplete() |
void |
onError(Throwable t) |
void |
onNext(ByteBuffer byteBuffer) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
available, mark, markSupported, reset, skippublic static AbortableInputStreamSubscriber.Builder builder()
public void abort()
Abortablepublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe in interface org.reactivestreams.Subscriber<ByteBuffer>public void onNext(ByteBuffer byteBuffer)
onNext in interface org.reactivestreams.Subscriber<ByteBuffer>public void onError(Throwable t)
onError in interface org.reactivestreams.Subscriber<ByteBuffer>public void onComplete()
onComplete in interface org.reactivestreams.Subscriber<ByteBuffer>public void close()
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamCopyright © 2026. All rights reserved.