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 OutputStream
public void write(byte[] b)
write
in class OutputStream
public void write(byte[] b, int off, int len)
write
in class OutputStream
public void flush()
flush
in interface Flushable
flush
in class OutputStream
public void cancel()
CancellableOutputStream
OutputStream.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 CancellableOutputStream
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
public void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s)
subscribe
in interface org.reactivestreams.Publisher<ByteBuffer>
Copyright © 2023. All rights reserved.