类 MultipartParser

java.lang.Object
reactor.core.publisher.BaseSubscriber<cn.taketoday.core.io.buffer.DataBuffer>
cn.taketoday.http.codec.multipart.MultipartParser
所有已实现的接口:
org.reactivestreams.Subscriber<cn.taketoday.core.io.buffer.DataBuffer>, org.reactivestreams.Subscription, reactor.core.CoreSubscriber<cn.taketoday.core.io.buffer.DataBuffer>, reactor.core.Disposable

final class MultipartParser extends reactor.core.publisher.BaseSubscriber<cn.taketoday.core.io.buffer.DataBuffer>
Subscribes to a buffer stream and produces a flux of MultipartParser.Token instances.
从以下版本开始:
4.0
作者:
Arjen Poutsma, Harry Yang
  • 字段详细资料

    • log

      private static final cn.taketoday.logging.Logger log
    • CR

      private static final byte CR
      另请参阅:
    • LF

      private static final byte LF
      另请参阅:
    • CR_LF

      private static final byte[] CR_LF
    • DOUBLE_CR_LF

      private static final byte[] DOUBLE_CR_LF
    • HYPHEN

      private static final byte HYPHEN
      另请参阅:
    • TWO_HYPHENS

      private static final byte[] TWO_HYPHENS
    • HEADER_ENTRY_SEPARATOR

      private static final String HEADER_ENTRY_SEPARATOR
      另请参阅:
    • sink

      private final reactor.core.publisher.FluxSink<MultipartParser.Token> sink
    • state

      private final AtomicReference<MultipartParser.State> state
    • boundary

      private final byte[] boundary
    • maxHeadersSize

      private final int maxHeadersSize
    • headersCharset

      private final Charset headersCharset
    • requestOutstanding

      private final AtomicBoolean requestOutstanding
  • 构造器详细资料

    • MultipartParser

      private MultipartParser(reactor.core.publisher.FluxSink<MultipartParser.Token> sink, byte[] boundary, int maxHeadersSize, Charset headersCharset)
  • 方法详细资料

    • parse

      public static reactor.core.publisher.Flux<MultipartParser.Token> parse(reactor.core.publisher.Flux<cn.taketoday.core.io.buffer.DataBuffer> buffers, byte[] boundary, int maxHeadersSize, Charset headersCharset)
      Parses the given stream of DataBuffer objects into a stream of MultipartParser.Token objects.
      参数:
      buffers - the input buffers
      boundary - the multipart boundary, as found in the Content-Type header
      maxHeadersSize - the maximum buffered header size
      headersCharset - the charset to use for decoding headers
      返回:
      a stream of parsed tokens
    • currentContext

      public reactor.util.context.Context currentContext()
    • hookOnSubscribe

      protected void hookOnSubscribe(org.reactivestreams.Subscription subscription)
      覆盖:
      hookOnSubscribe 在类中 reactor.core.publisher.BaseSubscriber<cn.taketoday.core.io.buffer.DataBuffer>
    • hookOnNext

      protected void hookOnNext(cn.taketoday.core.io.buffer.DataBuffer value)
      覆盖:
      hookOnNext 在类中 reactor.core.publisher.BaseSubscriber<cn.taketoday.core.io.buffer.DataBuffer>
    • hookOnComplete

      protected void hookOnComplete()
      覆盖:
      hookOnComplete 在类中 reactor.core.publisher.BaseSubscriber<cn.taketoday.core.io.buffer.DataBuffer>
    • hookOnError

      protected void hookOnError(Throwable throwable)
      覆盖:
      hookOnError 在类中 reactor.core.publisher.BaseSubscriber<cn.taketoday.core.io.buffer.DataBuffer>
    • onSinkCancel

      private void onSinkCancel()
    • changeState

      boolean changeState(MultipartParser.State oldState, MultipartParser.State newState, @Nullable cn.taketoday.core.io.buffer.DataBuffer remainder)
    • emitHeaders

      void emitHeaders(HttpHeaders headers)
    • emitBody

      void emitBody(cn.taketoday.core.io.buffer.DataBuffer buffer, boolean last)
    • emitError

      void emitError(Throwable t)
    • emitComplete

      void emitComplete()
    • requestBuffer

      private void requestBuffer()