Known Direct Subclasses
|
Known Indirect Subclasses
|
Class Overview
Abstract base class for HttpMessageConverters
that convert from/to XML.
By default, subclasses of this converter support text/xml, application/xml, and application/*-xml. This can be overridden by setting the supportedMediaTypes property.
Summary
|
[Expand]
Inherited Methods |
From class
org.springframework.http.converter.AbstractHttpMessageConverter
|
boolean
|
canRead(Class<?> clazz, MediaType mediaType)
Indicates whether the given class can be read by this converter.
This implementation checks if the given class is supported,
and if the supported media types
include the given media type.
|
|
boolean
|
canRead(MediaType mediaType)
|
|
boolean
|
canWrite(Class<?> clazz, MediaType mediaType)
Indicates whether the given class can be written by this converter.
This implementation checks if the given class is supported,
and if the supported media types
include the given media type.
|
|
boolean
|
canWrite(MediaType mediaType)
|
|
Long
|
getContentLength(T t, MediaType contentType)
Returns the content length for the given type.
|
|
MediaType
|
getDefaultContentType(T t)
Returns the default content type for the given type.
|
|
List<MediaType>
|
getSupportedMediaTypes()
Return the list of MediaType objects supported by this converter.
|
|
final
T
|
read(Class<? extends T> clazz, HttpInputMessage inputMessage)
|
|
abstract
T
|
readInternal(Class<? extends T> clazz, HttpInputMessage inputMessage)
Abstract template method that reads the actualy object.
|
|
void
|
setSupportedMediaTypes(List<MediaType> supportedMediaTypes)
Set the list of MediaType objects supported by this converter.
|
|
abstract
boolean
|
supports(Class<?> clazz)
Indicates whether the given class is supported by this converter.
|
|
final
void
|
write(T t, MediaType contentType, HttpOutputMessage outputMessage)
|
|
abstract
void
|
writeInternal(T t, HttpOutputMessage outputMessage)
Abstract template method that writes the actual body.
|
|
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.http.converter.HttpMessageConverter
|
Protected Constructors
protected
AbstractXmlHttpMessageConverter
()
Protected constructor that sets the supportedMediaTypes
to text/xml and application/xml, and application/*-xml.
Public Methods
public
final
T
readInternal
(Class<? extends T> clazz, HttpInputMessage inputMessage)
Parameters
| clazz
| the type of object to return |
| inputMessage
| the HTTP input message to read from |
Protected Methods
protected
abstract
T
readFromSource
(Class<? extends T> clazz, HttpHeaders headers, Source source)
Parameters
| clazz
| the type of object to return |
| headers
| the HTTP input headers |
| source
| the HTTP input body |
protected
void
transform
(Source source, Result result)
Transforms the given Source to the Result.
Parameters
| source
| the source to transform from |
| result
| the result to transform to |
protected
final
void
writeInternal
(T t, HttpOutputMessage outputMessage)
Parameters
| t
| the object to write to the output message |
| outputMessage
| the message to write to |
protected
abstract
void
writeToResult
(T t, HttpHeaders headers, Result result)
Parameters
| t
| the object to write to the output message |
| headers
| the HTTP output headers |
| result
| the HTTP output body |