Class ReaderBlockingByteBufferInputStream

java.lang.Object
java.io.InputStream
io.fusionauth.http.io.ReaderBlockingByteBufferInputStream
All Implemented Interfaces:
Closeable, AutoCloseable, Consumer<ByteBuffer>

public class ReaderBlockingByteBufferInputStream extends InputStream implements Consumer<ByteBuffer>
This InputStream uses ByteBuffers read by the Server processor and piped into this class. Those ByteBuffers are then fed to the reader of the InputStream. The pushing of ByteBuffers never blocks but the reading will block if there are no more bytes to read.

In order to handle chunking and other considerations, this class can be sub-classed to preprocess bytes.

Author:
Brian Pontarelli
  • Constructor Details

    • ReaderBlockingByteBufferInputStream

      public ReaderBlockingByteBufferInputStream()
  • Method Details