类 MultipartParser.HeadersState

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

private final class MultipartParser.HeadersState extends MultipartParser.State
The state of the parser dealing with part headers. Parses header buffers into a HttpHeaders instance, making sure that the amount does not exceed MultipartParser.maxHeadersSize.
  • 字段详细资料

    • endHeaders

      private final cn.taketoday.core.io.buffer.DataBufferUtils.Matcher endHeaders
    • byteCount

      private final AtomicInteger byteCount
    • buffers

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

    • HeadersState

      private HeadersState()
  • 方法详细资料

    • onNext

      public void onNext(cn.taketoday.core.io.buffer.DataBuffer buf)
      First checks whether the multipart boundary leading to this state was the final boundary, or whether MultipartParser.maxHeadersSize is exceeded. Then looks for the header-body boundary (CR LF CR LF) in the given buffer. If found, convert all buffers collected so far into a HttpHeaders object and changes to MultipartParser.BodyState, passing the remainder of the buffer. If the boundary is not found, the buffer is collected.
      指定者:
      onNext 在类中 MultipartParser.State
    • isLastBoundary

      private boolean isLastBoundary(cn.taketoday.core.io.buffer.DataBuffer buf)
      If the given buffer is the first buffer, check whether it starts with --. If it is the second buffer, check whether it makes up -- together with the first buffer.
    • belowMaxHeaderSize

      private boolean belowMaxHeaderSize(long count)
      Checks whether the given count is below or equal to MultipartParser.maxHeadersSize and emits a DataBufferLimitException if not.
    • parseHeaders

      private HttpHeaders parseHeaders()
      Parses the list of buffers into a HttpHeaders instance. Converts the joined buffers into a string using ISO=8859-1, and parses that string into key and values.
    • onComplete

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

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

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