public final class OutputStreamPublisher extends CancellableOutputStream implements org.reactivestreams.Publisher<ByteBuffer>
Publisher to an OutputStream.
Writes to the stream will block until demand is available in the downstream subscriber.
| Constructor and Description |
|---|
OutputStreamPublisher() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel writing to the stream.
|
void |
close() |
void |
flush() |
void |
subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public void write(int b)
write in class OutputStreampublic void write(byte[] b)
write in class OutputStreampublic void write(byte[] b,
int off,
int len)
write in class OutputStreampublic void flush()
flush in interface Flushableflush in class OutputStreampublic void cancel()
CancellableOutputStreamOutputStream.close() in that it indicates the data written so
far is truncated and incomplete. Callers must still invoke OutputStream.close() even if the stream is
cancelled.cancel in class CancellableOutputStreampublic void close()
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreampublic void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
subscribe in interface org.reactivestreams.Publisher<ByteBuffer>Copyright © 2023. All rights reserved.