public class InputStreamPublisher extends Object implements org.reactivestreams.Publisher<ByteBuffer>
| Constructor and Description |
|---|
InputStreamPublisher(InputStream stream)
Input stream backed publisher with a default buffer size of 8MB
|
InputStreamPublisher(InputStream stream,
int bufferSize)
Input stream backed publisher with a custom buffer size in bytes
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
readNext(InputStream stream,
ByteBuffer buffer) |
void |
subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
Creates a new subscription for the subscriber.
|
public InputStreamPublisher(InputStream stream)
stream - - the original stream that will be read.public InputStreamPublisher(InputStream stream, int bufferSize)
stream - - the original stream that will be readbufferSize - - size of the intermediate buffer in bytespublic void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
subscribe in interface org.reactivestreams.Publisher<ByteBuffer>s - - subscriber instanceprotected int readNext(InputStream stream, ByteBuffer buffer)
Copyright © 2025 MuleSoft, Inc.. All rights reserved.