Class BufferPublisherInputStream

java.lang.Object
java.io.InputStream
io.servicetalk.http.router.jersey.internal.BufferPublisherInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public final class BufferPublisherInputStream extends InputStream
An InputStream built around a Publisher<Buffer>, which can either be read OIO style or provide its wrapped Publisher. This allows us to provide JAX-RS with an InputStream and also short-circuit its usage when our code can directly deal with the Publisher<Buffer> it wraps.

Not threadsafe and intended to be used internally only, where no concurrency occurs between read(), read(byte[], int, int) and bufferPublisher().