Flow.Subscriber<java.nio.ByteBuffer>public class SubscriberInputStream extends java.io.InputStream implements Flow.Subscriber<java.nio.ByteBuffer>
subscriber that can subscribe to a source of ByteBuffer data chunks and then make
them available for consumption via standard blocking InputStream API.| Constructor | Description |
|---|---|
SubscriberInputStream() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
onComplete() |
Method invoked when it is known that no additional
Subscriber method invocations will occur for a Subscription
that is not already terminated by error, after which no
other Subscriber methods are invoked by the Subscription.
|
void |
onError(java.lang.Throwable throwable) |
Method invoked upon an unrecoverable error encountered by a
Publisher or Subscription, after which no other Subscriber
methods are invoked by the Subscription.
|
void |
onNext(java.nio.ByteBuffer item) |
Method invoked with a Subscription's next item.
|
void |
onSubscribe(Flow.Subscription subscription) |
Method invoked prior to invoking any other Subscriber
methods for the given Subscription.
|
int |
read() |
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void onSubscribe(Flow.Subscription subscription)
Flow.SubscriberTypically, implementations of this method invoke
subscription.request to enable receiving items.
onSubscribe in interface Flow.Subscriber<java.nio.ByteBuffer>subscription - a new subscriptionpublic void onNext(java.nio.ByteBuffer item)
Flow.SubscriberonNext in interface Flow.Subscriber<java.nio.ByteBuffer>item - the itempublic void onError(java.lang.Throwable throwable)
Flow.SubscriberonError in interface Flow.Subscriber<java.nio.ByteBuffer>throwable - the exceptionpublic void onComplete()
Flow.SubscriberonComplete in interface Flow.Subscriber<java.nio.ByteBuffer>Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.