public class Jaxb2XmlDecoder extends org.springframework.core.codec.AbstractDecoder<Object>
Object
s (POJOs).Jaxb2XmlEncoder
Constructor and Description |
---|
Jaxb2XmlDecoder() |
Jaxb2XmlDecoder(org.springframework.util.MimeType... supportedMimeTypes)
Create a
Jaxb2XmlDecoder with the specified MIME types. |
Modifier and Type | Method and Description |
---|---|
boolean |
canDecode(org.springframework.core.ResolvableType elementType,
org.springframework.util.MimeType mimeType) |
reactor.core.publisher.Flux<Object> |
decode(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> inputStream,
org.springframework.core.ResolvableType elementType,
org.springframework.util.MimeType mimeType,
Map<String,Object> hints) |
reactor.core.publisher.Mono<Object> |
decodeToMono(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> inputStream,
org.springframework.core.ResolvableType elementType,
org.springframework.util.MimeType mimeType,
Map<String,Object> hints) |
int |
getMaxInMemorySize()
Return the
configured byte count limit. |
Function<Unmarshaller,Unmarshaller> |
getUnmarshallerProcessor()
Return the configured processor for customizing Unmarshaller instances.
|
void |
setMaxInMemorySize(int byteCount)
Set the max number of bytes that can be buffered by this decoder.
|
void |
setUnmarshallerProcessor(Function<Unmarshaller,Unmarshaller> processor)
Configure a processor function to customize Unmarshaller instances.
|
public Jaxb2XmlDecoder()
public Jaxb2XmlDecoder(org.springframework.util.MimeType... supportedMimeTypes)
Jaxb2XmlDecoder
with the specified MIME types.supportedMimeTypes
- supported MIME typespublic void setUnmarshallerProcessor(Function<Unmarshaller,Unmarshaller> processor)
processor
- the function to usepublic Function<Unmarshaller,Unmarshaller> getUnmarshallerProcessor()
public void setMaxInMemorySize(int byteCount)
DataBufferLimitException
is raised.
By default in 5.1 this is set to -1, unlimited. In 5.2 the default value for this limit is set to 256K.
byteCount
- the max number of bytes to buffer, or -1 for unlimitedpublic int getMaxInMemorySize()
configured
byte count limit.public boolean canDecode(org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType)
public reactor.core.publisher.Flux<Object> decode(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> inputStream, org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String,Object> hints)
public reactor.core.publisher.Mono<Object> decodeToMono(org.reactivestreams.Publisher<org.springframework.core.io.buffer.DataBuffer> inputStream, org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String,Object> hints)