public class ResourceEncoder extends AbstractSingleValueEncoder<Resource>
Resources.| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_BUFFER_SIZEThe default buffer size used by the encoder. | 
logger| Constructor and Description | 
|---|
| ResourceEncoder() | 
| ResourceEncoder(int bufferSize) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | canEncode(ResolvableType elementType,
         MimeType mimeType)Whether the encoder supports the given source element type and the MIME
 type for the output stream. | 
| protected reactor.core.publisher.Flux<DataBuffer> | encode(Resource resource,
      DataBufferFactory bufferFactory,
      ResolvableType type,
      MimeType mimeType,
      Map<String,Object> hints)Encode  Tto an outputDataBufferstream. | 
encodegetEncodableMimeTypes, getLogger, setLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencodeValuepublic static final int DEFAULT_BUFFER_SIZE
public ResourceEncoder()
public ResourceEncoder(int bufferSize)
public boolean canEncode(ResolvableType elementType, @Nullable MimeType mimeType)
EncodercanEncode in interface Encoder<Resource>canEncode in class AbstractEncoder<Resource>elementType - the type of elements in the source streammimeType - the MIME type for the output stream
 (can be null if not specified)true if supported, false otherwiseprotected reactor.core.publisher.Flux<DataBuffer> encode(Resource resource, DataBufferFactory bufferFactory, ResolvableType type, @Nullable MimeType mimeType, @Nullable Map<String,Object> hints)
AbstractSingleValueEncoderT to an output DataBuffer stream.encode in class AbstractSingleValueEncoder<Resource>resource - the value to processbufferFactory - a buffer factory used to create the outputtype - the stream element type to processmimeType - the mime type to processhints - additional information about how to do decode, optional