类 AbstractDataBufferDecoder<T>

java.lang.Object
org.springframework.core.codec.AbstractDecoder<T>
org.springframework.core.codec.AbstractDataBufferDecoder<T>
类型参数:
T - the element type
所有已实现的接口:
org.springframework.core.codec.Decoder<T>

public abstract class AbstractDataBufferDecoder<T> extends org.springframework.core.codec.AbstractDecoder<T>
从以下版本开始:
5.0
  • 字段概要

    从类继承的字段 org.springframework.core.codec.AbstractDecoder

    logger
  • 构造器概要

    构造器
    限定符
    构造器
    说明
    protected
    AbstractDataBufferDecoder(org.springframework.util.MimeType... supportedMimeTypes)
     
  • 方法概要

    修饰符和类型
    方法
    说明
    reactor.core.publisher.Flux<T>
    decode(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> input, org.springframework.core.ResolvableType elementType, org.springframework.util.MimeType mimeType, Map<String,Object> hints)
     
    protected T
    decodeDataBuffer(org.springframework.core.io.buffer.DataBuffer buffer, org.springframework.core.ResolvableType elementType, org.springframework.util.MimeType mimeType, Map<String,Object> hints)
    已过时。
    as of 5.2, please implement Decoder.decode(DataBuffer, ResolvableType, MimeType, Map) instead
    reactor.core.publisher.Mono<T>
    decodeToMono(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> input, org.springframework.core.ResolvableType elementType, org.springframework.util.MimeType mimeType, Map<String,Object> hints)
     
    int
    Return the configured byte count limit.
    void
    setMaxInMemorySize(int byteCount)
    Configure a limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated.

    从类继承的方法 org.springframework.core.codec.AbstractDecoder

    canDecode, getDecodableMimeTypes, getLogger, setLogger

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

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 org.springframework.core.codec.Decoder

    decode, getDecodableMimeTypes
  • 构造器详细资料

    • AbstractDataBufferDecoder

      protected AbstractDataBufferDecoder(org.springframework.util.MimeType... supportedMimeTypes)
  • 方法详细资料

    • setMaxInMemorySize

      public void setMaxInMemorySize(int byteCount)
      Configure a limit on the number of bytes that can be buffered whenever the input stream needs to be aggregated. This can be a result of decoding to a single DataBuffer, ByteBuffer, byte[], Resource, String, etc. It can also occur when splitting the input stream, e.g. delimited text, in which case the limit applies to data buffered between delimiters.

      By default this is set to 256K.

      参数:
      byteCount - the max number of bytes to buffer, or -1 for unlimited
      从以下版本开始:
      5.1.11
    • getMaxInMemorySize

      public int getMaxInMemorySize()
      Return the configured byte count limit.
      从以下版本开始:
      5.1.11
    • decode

      public reactor.core.publisher.Flux<T> decode(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> input, org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String,Object> hints)
    • decodeToMono

      public reactor.core.publisher.Mono<T> decodeToMono(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> input, org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String,Object> hints)
      指定者:
      decodeToMono 在接口中 org.springframework.core.codec.Decoder<T>
      覆盖:
      decodeToMono 在类中 org.springframework.core.codec.AbstractDecoder<T>
    • decodeDataBuffer

      @Deprecated @Nullable protected T decodeDataBuffer(org.springframework.core.io.buffer.DataBuffer buffer, org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String,Object> hints)
      已过时。
      as of 5.2, please implement Decoder.decode(DataBuffer, ResolvableType, MimeType, Map) instead
      How to decode a DataBuffer to the target element type.