Class AbstractDecoder<T>
java.lang.Object
org.springframework.core.codec.AbstractDecoder<T>
- Type Parameters:
- T- the element type
- All Implemented Interfaces:
- Decoder<T>
- Direct Known Subclasses:
- AbstractDataBufferDecoder, Jaxb2XmlDecoder, XmlEventDecoder
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanDecode(ResolvableType elementType, @Nullable MimeType mimeType) Whether the decoder supports the given target element type and the MIME type of the source stream.reactor.core.publisher.Mono<T> decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Decode aDataBufferinput stream into a Mono ofT.Return the list of MIME types supported by this Decoder.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 Decoderdecode, decode, getDecodableMimeTypes
- 
Field Details- 
loggerprotected org.apache.commons.logging.Log logger
 
- 
- 
Constructor Details- 
AbstractDecoder
 
- 
- 
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
 
- 
getDecodableMimeTypesDescription copied from interface:DecoderReturn the list of MIME types supported by this Decoder. The list may not apply to every possible target element type and calls to this method should typically be guarded viacanDecode(elementType, null). The list may also exclude MIME types supported only for a specific element type. Alternatively, useDecoder.getDecodableMimeTypes(ResolvableType)for a more precise list.- Specified by:
- getDecodableMimeTypesin interface- Decoder<T>
- Returns:
- the list of supported MIME types
 
- 
canDecodeDescription copied from interface:DecoderWhether the decoder supports the given target element type and the MIME type of the source stream.
- 
decodeToMonopublic reactor.core.publisher.Mono<T> decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) Description copied from interface:DecoderDecode aDataBufferinput stream into a Mono ofT.- Specified by:
- decodeToMonoin interface- Decoder<T>
- Parameters:
- inputStream- the- DataBufferinput stream to decode
- elementType- the expected type of elements in the output stream; this type must have been previously passed to the- Decoder.canDecode(ResolvableType, MimeType)method and it must have returned- true.
- mimeType- the MIME type associated with the input stream (optional)
- hints- additional information about how to do decode
- Returns:
- the output stream with the decoded element
 
 
-