类 MultipartParser.HeadersState
java.lang.Object
cn.taketoday.http.codec.multipart.MultipartParser.State
cn.taketoday.http.codec.multipart.MultipartParser.HeadersState
- 封闭类:
- MultipartParser
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.-
字段概要
字段修饰符和类型字段说明private final ArrayList<cn.taketoday.core.io.buffer.DataBuffer>private final AtomicIntegerprivate final cn.taketoday.core.io.buffer.DataBufferUtils.Matcher -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private booleanbelowMaxHeaderSize(long count) Checks whether the givencountis below or equal toMultipartParser.maxHeadersSizeand emits aDataBufferLimitExceptionif not.voiddispose()private booleanisLastBoundary(cn.taketoday.core.io.buffer.DataBuffer buf) If the given buffer is the first buffer, check whether it starts with--.voidvoidonNext(cn.taketoday.core.io.buffer.DataBuffer buf) First checks whether the multipart boundary leading to this state was the final boundary, or whetherMultipartParser.maxHeadersSizeis exceeded.private HttpHeadersParses the list of buffers into aHttpHeadersinstance.toString()
-
字段详细资料
-
endHeaders
private final cn.taketoday.core.io.buffer.DataBufferUtils.Matcher endHeaders -
byteCount
-
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 whetherMultipartParser.maxHeadersSizeis 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 aHttpHeadersobject and changes toMultipartParser.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 givencountis below or equal toMultipartParser.maxHeadersSizeand emits aDataBufferLimitExceptionif not. -
parseHeaders
Parses the list of buffers into aHttpHeadersinstance. 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
-