public class PublisherInputStream extends java.io.InputStream implements Flow.Publisher<DataChunk>
subscriber that can subscribe to a source of ByteBuffer data chunks and then make
them available for consumption via standard blocking InputStream API.| Constructor and Description |
|---|
PublisherInputStream(Flow.Publisher<DataChunk> originalPublisher)
Wraps the supplied publisher and adds a blocking
InputStream based nature. |
| Modifier and Type | Method and Description |
|---|---|
int |
read() |
void |
subscribe(Flow.Subscriber<? super DataChunk> subscriber) |
public PublisherInputStream(Flow.Publisher<DataChunk> originalPublisher)
InputStream based nature.
It is illegal to subscribe to the returned publisher.originalPublisher - the original publisher to wrappublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void subscribe(Flow.Subscriber<? super DataChunk> subscriber)
subscribe in interface Flow.Publisher<DataChunk>Copyright © 2018–2019 Oracle Corporation. All rights reserved.