Class InputStreamConsumingPublisher
java.lang.Object
software.amazon.awssdk.utils.async.InputStreamConsumingPublisher
- All Implemented Interfaces:
 org.reactivestreams.Publisher<ByteBuffer>
public class InputStreamConsumingPublisher
extends Object
implements org.reactivestreams.Publisher<ByteBuffer>
A publisher to which an 
InputStream can be written.
 - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancel an ongoingdoBlockingWrite(InputStream)call.longdoBlockingWrite(InputStream inputStream) Write the provided input stream to the stream subscribed to this publisher.voidsubscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)  
- 
Constructor Details
- 
InputStreamConsumingPublisher
public InputStreamConsumingPublisher() 
 - 
 - 
Method Details
- 
doBlockingWrite
Write the provided input stream to the stream subscribed to this publisher.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.- Returns:
 - The amount of data written to the downstream subscriber.
 
 - 
cancel
public void cancel()Cancel an ongoingdoBlockingWrite(InputStream)call. - 
subscribe
- Specified by:
 subscribein interfaceorg.reactivestreams.Publisher<ByteBuffer>
 
 -