|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.http.converter.AbstractHttpMessageConverter<T> org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<T>
public abstract class AbstractXmlHttpMessageConverter<T>
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.
Constructor Summary | |
---|---|
protected |
AbstractXmlHttpMessageConverter()
Protected constructor that sets the supportedMediaTypes
to text/xml and application/xml , and application/*-xml . |
Method Summary | |
---|---|
protected abstract T |
readFromSource(java.lang.Class<? extends T> clazz,
HttpHeaders headers,
javax.xml.transform.Source source)
Abstract template method called from AbstractHttpMessageConverter.read(Class, HttpInputMessage) . |
T |
readInternal(java.lang.Class<? extends T> clazz,
HttpInputMessage inputMessage)
Abstract template method that reads the actualy object. |
protected void |
transform(javax.xml.transform.Source source,
javax.xml.transform.Result result)
Transforms the given Source to the Result . |
protected void |
writeInternal(T t,
HttpOutputMessage outputMessage)
Abstract template method that writes the actual body. |
protected abstract void |
writeToResult(T t,
HttpHeaders headers,
javax.xml.transform.Result result)
Abstract template method called from writeInternal(Object, HttpOutputMessage) . |
Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter |
---|
canRead, canRead, canWrite, canWrite, getContentLength, getDefaultContentType, getSupportedMediaTypes, read, setSupportedMediaTypes, supports, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractXmlHttpMessageConverter()
supportedMediaTypes
to text/xml
and application/xml
, and application/*-xml
.
Method Detail |
---|
public final T readInternal(java.lang.Class<? extends T> clazz, HttpInputMessage inputMessage) throws java.io.IOException
AbstractHttpMessageConverter
AbstractHttpMessageConverter.read(java.lang.Class extends T>, org.springframework.http.HttpInputMessage)
.
readInternal
in class AbstractHttpMessageConverter<T>
clazz
- the type of object to returninputMessage
- the HTTP input message to read from
java.io.IOException
- in case of I/O errorsprotected final void writeInternal(T t, HttpOutputMessage outputMessage) throws java.io.IOException
AbstractHttpMessageConverter
AbstractHttpMessageConverter.write(T, org.springframework.http.MediaType, org.springframework.http.HttpOutputMessage)
.
writeInternal
in class AbstractHttpMessageConverter<T>
t
- the object to write to the output messageoutputMessage
- the message to write to
java.io.IOException
- in case of I/O errorsprotected void transform(javax.xml.transform.Source source, javax.xml.transform.Result result) throws javax.xml.transform.TransformerException
Source
to the Result
.
source
- the source to transform fromresult
- the result to transform to
javax.xml.transform.TransformerException
- in case of transformation errorsprotected abstract T readFromSource(java.lang.Class<? extends T> clazz, HttpHeaders headers, javax.xml.transform.Source source) throws java.io.IOException
AbstractHttpMessageConverter.read(Class, HttpInputMessage)
.
clazz
- the type of object to returnheaders
- the HTTP input headerssource
- the HTTP input body
java.io.IOException
- in case of I/O errors
HttpMessageConversionException
- in case of conversion errorsprotected abstract void writeToResult(T t, HttpHeaders headers, javax.xml.transform.Result result) throws java.io.IOException
writeInternal(Object, HttpOutputMessage)
.
t
- the object to write to the output messageheaders
- the HTTP output headersresult
- the HTTP output body
java.io.IOException
- in case of I/O errors
HttpMessageConversionException
- in case of conversion errors
|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |