类 MultipartParser.BodyState
java.lang.Object
cn.taketoday.http.codec.multipart.MultipartParser.State
cn.taketoday.http.codec.multipart.MultipartParser.BodyState
- 封闭类:
- MultipartParser
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.Matcherprivate final intprivate final Deque<cn.taketoday.core.io.buffer.DataBuffer> -
构造器概要
构造器 -
方法概要
-
字段详细资料
-
boundary
private final cn.taketoday.core.io.buffer.DataBufferUtils.Matcher boundary -
boundaryLength
private final int boundaryLength -
queue
-
-
构造器详细资料
-
BodyState
public BodyState()
-
-
方法详细资料
-
onNext
public void onNext(cn.taketoday.core.io.buffer.DataBuffer buffer) Checks whether the (end of the) needleCR LF - - boundarycan be found inbuffer. 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 toMultipartParser.HeadersStateand pass on the remainder ofbuffer. If the needle is not found, we enqueuebuffer.- 指定者:
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
-