Class ChunkedBodyProcessor

java.lang.Object
io.fusionauth.http.body.request.ChunkedBodyProcessor
All Implemented Interfaces:
BodyProcessor

public class ChunkedBodyProcessor extends Object implements BodyProcessor
A body processor that handles chunked requests/responses.
Author:
Brian Pontarelli
  • Field Details

  • Constructor Details

    • ChunkedBodyProcessor

      public ChunkedBodyProcessor(int bufferSize)
  • Method Details

    • currentBuffer

      public ByteBuffer currentBuffer()
      Specified by:
      currentBuffer in interface BodyProcessor
      Returns:
      The current buffer that the selector should use for reading.
    • isComplete

      public boolean isComplete()
      Specified by:
      isComplete in interface BodyProcessor
      Returns:
      True if the body processing is complete.
    • processBuffer

      public void processBuffer(Consumer<ByteBuffer> consumer)
      Description copied from interface: BodyProcessor
      Called after bytes are read into the current buffer in order to process the bytes read.
      Specified by:
      processBuffer in interface BodyProcessor
      Parameters:
      consumer - A consumer of finished ByteBuffers.
    • totalBytesProcessed

      public long totalBytesProcessed()
      Specified by:
      totalBytesProcessed in interface BodyProcessor