Flow.Publisher<ByteBuffer>, Closeable, Flushable, AutoCloseablepublic class OutputStreamPublisher extends OutputStream implements Flow.Publisher<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 ByteBuffer> subscriberParam) |
Adds the given Subscriber if possible.
|
void |
write(byte[] b) |
|
void |
write(byte[] b,
int off,
int len) |
|
void |
write(int b) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitflushpublic void subscribe(Flow.Subscriber<? super 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<ByteBuffer>subscriberParam - the subscriberpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface AutoCloseableclose in interface Closeableclose in class OutputStreamIOExceptionCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.