类 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
-
嵌套类概要
嵌套类修饰符和类型类说明private final classThe state of the parser dealing with multipart bodies.static final classRepresents a token that containsDataBuffer.private static final classThe state of the parser when finished, either due to seeing the final boundary or to a malformed message.private final classThe state of the parser dealing with part headers.static final classRepresents a token that containsHttpHeaders.private final classThe initial state of the parser.private static classRepresents the internal state of theMultipartParser.static classRepresents the output ofparse(Flux, byte[], int, Charset).从接口继承的嵌套类/接口 reactor.core.Disposable
reactor.core.Disposable.Composite, reactor.core.Disposable.Swap -
字段概要
字段修饰符和类型字段说明private final byte[]private static final byteprivate static final byte[]private static final byte[]private static final Stringprivate final Charsetprivate static final byteprivate static final byteprivate static final cn.taketoday.logging.Loggerprivate final intprivate final AtomicBooleanprivate final reactor.core.publisher.FluxSink<MultipartParser.Token>private final AtomicReference<MultipartParser.State>private static final byte[] -
构造器概要
构造器限定符构造器说明privateMultipartParser(reactor.core.publisher.FluxSink<MultipartParser.Token> sink, byte[] boundary, int maxHeadersSize, Charset headersCharset) -
方法概要
修饰符和类型方法说明(专用程序包) booleanchangeState(MultipartParser.State oldState, MultipartParser.State newState, cn.taketoday.core.io.buffer.DataBuffer remainder) reactor.util.context.Context(专用程序包) voidemitBody(cn.taketoday.core.io.buffer.DataBuffer buffer, boolean last) (专用程序包) void(专用程序包) void(专用程序包) voidemitHeaders(HttpHeaders headers) protected voidprotected voidhookOnError(Throwable throwable) protected voidhookOnNext(cn.taketoday.core.io.buffer.DataBuffer value) protected voidhookOnSubscribe(org.reactivestreams.Subscription subscription) private voidstatic 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 ofDataBufferobjects into a stream ofMultipartParser.Tokenobjects.private void从类继承的方法 reactor.core.publisher.BaseSubscriber
cancel, dispose, hookFinally, hookOnCancel, isDisposed, onComplete, onError, onNext, onSubscribe, request, requestUnbounded, toString, upstream
-
字段详细资料
-
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
- 另请参阅:
-
sink
-
state
-
boundary
private final byte[] boundary -
maxHeadersSize
private final int maxHeadersSize -
headersCharset
-
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 ofDataBufferobjects into a stream ofMultipartParser.Tokenobjects.- 参数:
buffers- the input buffersboundary- the multipart boundary, as found in theContent-TypeheadermaxHeadersSize- the maximum buffered header sizeheadersCharset- 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
- 覆盖:
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
-
emitBody
void emitBody(cn.taketoday.core.io.buffer.DataBuffer buffer, boolean last) -
emitError
-
emitComplete
void emitComplete() -
requestBuffer
private void requestBuffer()
-