类 MultipartParser.BodyState

java.lang.Object
cn.taketoday.http.codec.multipart.MultipartParser.State
cn.taketoday.http.codec.multipart.MultipartParser.BodyState
封闭类:
MultipartParser

private final class MultipartParser.BodyState extends MultipartParser.State
The state of the parser dealing with multipart bodies. Relays data buffers as MultipartParser.BodyToken until the boundary is found (or rather: CR LF - - boundary.
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private final cn.taketoday.core.io.buffer.DataBufferUtils.Matcher
     
    private final int
     
    private final Deque<cn.taketoday.core.io.buffer.DataBuffer>
     
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    void
     
    private void
    enqueue(cn.taketoday.core.io.buffer.DataBuffer buf)
    Store the given buffer.
    private void
     
    void
     
    void
    onNext(cn.taketoday.core.io.buffer.DataBuffer buffer)
    Checks whether the (end of the) needle CR LF - - boundary can be found in buffer.
     

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 字段详细资料

    • boundary

      private final cn.taketoday.core.io.buffer.DataBufferUtils.Matcher boundary
    • boundaryLength

      private final int boundaryLength
    • queue

      private final Deque<cn.taketoday.core.io.buffer.DataBuffer> queue
  • 构造器详细资料

    • BodyState

      public BodyState()
  • 方法详细资料

    • onNext

      public void onNext(cn.taketoday.core.io.buffer.DataBuffer buffer)
      Checks whether the (end of the) needle CR LF - - boundary can be found in buffer. If found, the needle can overflow into the previous buffer, so we calculate the length and slice the current and previous buffers accordingly. We then change to MultipartParser.HeadersState and pass on the remainder of buffer. If the needle is not found, we enqueue buffer.
      指定者:
      onNext 在类中 MultipartParser.State
    • enqueue

      private void enqueue(cn.taketoday.core.io.buffer.DataBuffer buf)
      Store the given buffer. Emit buffers that cannot contain boundary bytes, by iterating over the queue in reverse order, and summing buffer sizes. The first buffer that passes the boundary length and subsequent buffers are emitted (in the correct, non-reverse order).
    • flush

      private void flush()
    • onComplete

      public void onComplete()
      指定者:
      onComplete 在类中 MultipartParser.State
    • dispose

      public void dispose()
      覆盖:
      dispose 在类中 MultipartParser.State
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object