|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.http.converter.AbstractHttpMessageConverter<T>
org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<T>
org.springframework.http.converter.xml.SourceHttpMessageConverter<T>
public class SourceHttpMessageConverter<T extends javax.xml.transform.Source>
Implementation of HttpMessageConverter
that can read and write Source
objects.
Constructor Summary | |
---|---|
SourceHttpMessageConverter()
|
Method Summary | |
---|---|
protected java.lang.Long |
getContentLength(T t,
MediaType contentType)
Returns the content length for the given type. |
protected T |
readFromSource(java.lang.Class<? extends T> clazz,
HttpHeaders headers,
javax.xml.transform.Source source)
Abstract template method called from AbstractHttpMessageConverter.read(Class, HttpInputMessage) . |
boolean |
supports(java.lang.Class<?> clazz)
Indicates whether the given class is supported by this converter. |
protected void |
writeToResult(T t,
HttpHeaders headers,
javax.xml.transform.Result result)
Abstract template method called from AbstractXmlHttpMessageConverter.writeInternal(Object, HttpOutputMessage) . |
Methods inherited from class org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter |
---|
readInternal, transform, writeInternal |
Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter |
---|
canRead, canRead, canWrite, canWrite, getDefaultContentType, getSupportedMediaTypes, read, setSupportedMediaTypes, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceHttpMessageConverter()
Method Detail |
---|
public boolean supports(java.lang.Class<?> clazz)
AbstractHttpMessageConverter
supports
in class AbstractHttpMessageConverter<T extends javax.xml.transform.Source>
clazz
- the class to test for support
true
if supported; false
otherwiseprotected T readFromSource(java.lang.Class<? extends T> clazz, HttpHeaders headers, javax.xml.transform.Source source) throws java.io.IOException
AbstractXmlHttpMessageConverter
AbstractHttpMessageConverter.read(Class, HttpInputMessage)
.
readFromSource
in class AbstractXmlHttpMessageConverter<T extends javax.xml.transform.Source>
clazz
- the type of object to returnheaders
- the HTTP input headerssource
- the HTTP input body
java.io.IOException
- in case of I/O errorsprotected java.lang.Long getContentLength(T t, MediaType contentType)
AbstractHttpMessageConverter
By default, this returns null
, meaning that the content length is unknown.
Can be overridden in subclasses.
getContentLength
in class AbstractHttpMessageConverter<T extends javax.xml.transform.Source>
t
- the type to return the content length for
null
if not knownprotected void writeToResult(T t, HttpHeaders headers, javax.xml.transform.Result result) throws java.io.IOException
AbstractXmlHttpMessageConverter
AbstractXmlHttpMessageConverter.writeInternal(Object, HttpOutputMessage)
.
writeToResult
in class AbstractXmlHttpMessageConverter<T extends javax.xml.transform.Source>
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
|
Spring for Android | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |