public class InputStreamConsumingPublisher extends Object implements org.reactivestreams.Publisher<ByteBuffer>
InputStream
can be written.
Constructor and Description |
---|
InputStreamConsumingPublisher() |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel an ongoing
doBlockingWrite(InputStream) call. |
long |
doBlockingWrite(InputStream inputStream)
Write the provided input stream to the stream subscribed to this publisher.
|
void |
subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s) |
public long doBlockingWrite(InputStream inputStream)
This method will block the calling thread to write until: (1) the provided input stream is fully consumed,
(2) the subscription is cancelled, (3) reading from the input stream fails, or (4) cancel()
is called.
public void cancel()
doBlockingWrite(InputStream)
call.public void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
subscribe
in interface org.reactivestreams.Publisher<ByteBuffer>
Copyright © 2023. All rights reserved.