org.springframework.http.converter.xml
Class SimpleXmlHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<java.lang.Object>
org.springframework.http.converter.xml.SimpleXmlHttpMessageConverter
- All Implemented Interfaces:
- HttpMessageConverter<java.lang.Object>
public class SimpleXmlHttpMessageConverter
- extends AbstractHttpMessageConverter<java.lang.Object>
Implementation of HttpMessageConverter
that can read and write XML using Simple's Persister abstraction.
*
By default, this converter supports text/xml and application/xml. This can be
overridden by setting the supportedMediaTypes property.
- Since:
- 1.0.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CHARSET
public static final java.nio.charset.Charset DEFAULT_CHARSET
SimpleXmlHttpMessageConverter
public SimpleXmlHttpMessageConverter()
- Protected constructor that sets the
supportedMediaTypes
to text/xml and application/xml, and application/*-xml.
canRead
public boolean canRead(java.lang.Class<?> clazz,
MediaType mediaType)
- Specified by:
canRead in interface HttpMessageConverter<java.lang.Object>- Overrides:
canRead in class AbstractHttpMessageConverter<java.lang.Object>
canWrite
public boolean canWrite(java.lang.Class<?> clazz,
MediaType mediaType)
- Specified by:
canWrite in interface HttpMessageConverter<java.lang.Object>- Overrides:
canWrite in class AbstractHttpMessageConverter<java.lang.Object>
supports
protected boolean supports(java.lang.Class<?> clazz)
- Specified by:
supports in class AbstractHttpMessageConverter<java.lang.Object>
readInternal
protected java.lang.Object readInternal(java.lang.Class<? extends java.lang.Object> clazz,
HttpInputMessage inputMessage)
throws java.io.IOException
- Specified by:
readInternal in class AbstractHttpMessageConverter<java.lang.Object>
- Throws:
java.io.IOException
writeInternal
protected void writeInternal(java.lang.Object o,
HttpOutputMessage outputMessage)
throws java.io.IOException
- Specified by:
writeInternal in class AbstractHttpMessageConverter<java.lang.Object>
- Throws:
java.io.IOException