Polishing
This commit is contained in:
parent
202825554c
commit
c1f179677a
|
@ -10,18 +10,18 @@ import org.springframework.reactive.util.BlockingSignalQueue;
|
|||
|
||||
/**
|
||||
* {@code OutputStream} implementation that stores all written bytes, to be retrieved
|
||||
* using {@link #toByteBufPublisher()}.
|
||||
* using {@link #toByteArrayPublisher()}.
|
||||
* @author Arjen Poutsma
|
||||
*/
|
||||
public class ByteArrayPublisherOutputStream extends OutputStream {
|
||||
|
||||
private final BlockingSignalQueue<byte[]> queue = new BlockingSignalQueue<byte[]>();
|
||||
private final BlockingSignalQueue<byte[]> queue = new BlockingSignalQueue<>();
|
||||
|
||||
/**
|
||||
* Returns the written data as a {@code Publisher}.
|
||||
* @return a publisher for the written bytes
|
||||
*/
|
||||
public Publisher<byte[]> toByteBufPublisher() {
|
||||
public Publisher<byte[]> toByteArrayPublisher() {
|
||||
return this.queue.publisher();
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.reactivestreams.Subscription;
|
|||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A {@link BlockingQueue} aimed at working with {@code Publisher<ByteBuf>} instances.
|
||||
* A {@link BlockingQueue} aimed at working with {@code Publisher<byte[]>} instances.
|
||||
* Mainly meant to bridge between reactive and non-reactive APIs, such as blocking
|
||||
* streams.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue