Class AbstractEncoder<T>
java.lang.Object
org.springframework.core.codec.AbstractEncoder<T>
- Type Parameters:
- T- the element type
- All Implemented Interfaces:
- Encoder<T>
- Direct Known Subclasses:
- AbstractSingleValueEncoder, ByteArrayEncoder, ByteBufferEncoder, CharSequenceEncoder, DataBufferEncoder, GsonEncoder, NettyByteBufEncoder, ResourceRegionEncoder
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanEncode(ResolvableType elementType, @Nullable MimeType mimeType) Whether the encoder supports the given source element type and the MIME type for the output stream.Return the list of MIME types supported by this Encoder.org.apache.commons.logging.LogReturn the currently configured Logger.voidsetLogger(org.apache.commons.logging.Log logger) Set an alternative logger to use than the one based on the class name.Methods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Encoderencode, encodeValue, getEncodableMimeTypes
- 
Field Details- 
loggerprotected org.apache.commons.logging.Log logger
 
- 
- 
Constructor Details- 
AbstractEncoder
 
- 
- 
Method Details- 
setLoggerpublic void setLogger(org.apache.commons.logging.Log logger) Set an alternative logger to use than the one based on the class name.- Parameters:
- logger- the logger to use
- Since:
- 5.1
 
- 
getLoggerpublic org.apache.commons.logging.Log getLogger()Return the currently configured Logger.- Since:
- 5.1
 
- 
getEncodableMimeTypesDescription copied from interface:EncoderReturn the list of MIME types supported by this Encoder. The list may not apply to every possible target element type and calls to this method should typically be guarded viacanEncode(elementType, null). The list may also exclude MIME types supported only for a specific element type. Alternatively, useEncoder.getEncodableMimeTypes(ResolvableType)for a more precise list.- Specified by:
- getEncodableMimeTypesin interface- Encoder<T>
- Returns:
- the list of supported MIME types
 
- 
canEncodeDescription copied from interface:EncoderWhether the encoder supports the given source element type and the MIME type for the output stream.
 
-