Flow.Publisher<java.nio.ByteBuffer>public class OutputStreamPublisher extends java.io.OutputStream implements Flow.Publisher<java.nio.ByteBuffer>
publishes any data written to it as ByteBuffer
events.| Constructor | Description |
|---|---|
OutputStreamPublisher() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
subscribe(Flow.Subscriber<? super java.nio.ByteBuffer> subscriberParam) |
Adds the given Subscriber if possible.
|
void |
write(byte[] b) |
|
void |
write(byte[] b,
int off,
int len) |
|
void |
write(int b) |
public void subscribe(Flow.Subscriber<? super java.nio.ByteBuffer> subscriberParam)
Flow.PublisheronError
method is invoked with an IllegalStateException.
Otherwise, the Subscriber's onSubscribe method is
invoked with a new Flow.Subscription. Subscribers may
enable receiving items by invoking the request
method of this Subscription, and may unsubscribe by
invoking its cancel method.subscribe in interface Flow.Publisher<java.nio.ByteBuffer>subscriberParam - the subscriberpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in class java.io.OutputStreamjava.io.IOExceptionCopyright © 2018 Oracle Corporation. All rights reserved.