类 AbstractXmlHttpMessageConverter<T>
java.lang.Object
cn.taketoday.http.converter.AbstractHttpMessageConverter<T>
cn.taketoday.http.converter.xml.AbstractXmlHttpMessageConverter<T>
- 类型参数:
T- the converted object type
- 所有已实现的接口:
HttpMessageConverter<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.
- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma, Juergen Hoeller
-
字段概要
字段从类继承的字段 cn.taketoday.http.converter.AbstractHttpMessageConverter
logger -
构造器概要
构造器限定符构造器说明protectedProtected constructor that sets thesupportedMediaTypestotext/xmlandapplication/xml, andapplication/*-xml. -
方法概要
修饰符和类型方法说明protected abstract TreadFromSource(Class<? extends T> clazz, HttpHeaders headers, Source source) Abstract template method called fromAbstractHttpMessageConverter.read(Class, HttpInputMessage).final TreadInternal(Class<? extends T> clazz, HttpInputMessage inputMessage) Abstract template method that reads the actual object.protected voidTransforms the givenSourceto theResult.protected final voidwriteInternal(T t, HttpOutputMessage outputMessage) Abstract template method that writes the actual body.protected abstract voidwriteToResult(T t, HttpHeaders headers, Result result) Abstract template method called fromwriteInternal(Object, HttpOutputMessage).从类继承的方法 cn.taketoday.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, supports, write从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.converter.HttpMessageConverter
getSupportedMediaTypes
-
字段详细资料
-
transformerFactory
-
-
构造器详细资料
-
AbstractXmlHttpMessageConverter
protected AbstractXmlHttpMessageConverter()Protected constructor that sets thesupportedMediaTypestotext/xmlandapplication/xml, andapplication/*-xml.
-
-
方法详细资料
-
readInternal
public final T readInternal(Class<? extends T> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException 从类复制的说明:AbstractHttpMessageConverterAbstract template method that reads the actual object. Invoked fromAbstractHttpMessageConverter.read(java.lang.Class<? extends T>, cn.taketoday.http.HttpInputMessage).- 指定者:
readInternal在类中AbstractHttpMessageConverter<T>- 参数:
clazz- the type of object to returninputMessage- the HTTP input message to read from- 返回:
- the converted object
- 抛出:
IOException- in case of I/O errorsHttpMessageNotReadableException- in case of conversion errors
-
writeInternal
protected final void writeInternal(T t, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException 从类复制的说明:AbstractHttpMessageConverterAbstract template method that writes the actual body. Invoked fromAbstractHttpMessageConverter.write(T, cn.taketoday.http.MediaType, cn.taketoday.http.HttpOutputMessage).- 指定者:
writeInternal在类中AbstractHttpMessageConverter<T>- 参数:
t- the object to write to the output messageoutputMessage- the HTTP output message to write to- 抛出:
IOException- in case of I/O errorsHttpMessageNotWritableException- in case of conversion errors
-
transform
Transforms the givenSourceto theResult.- 参数:
source- the source to transform fromresult- the result to transform to- 抛出:
TransformerException- in case of transformation errors
-
readFromSource
protected abstract T readFromSource(Class<? extends T> clazz, HttpHeaders headers, Source source) throws Exception Abstract template method called fromAbstractHttpMessageConverter.read(Class, HttpInputMessage).- 参数:
clazz- the type of object to returnheaders- the HTTP input headerssource- the HTTP input body- 返回:
- the converted object
- 抛出:
Exception- in case of I/O or conversion errors
-
writeToResult
Abstract template method called fromwriteInternal(Object, HttpOutputMessage).- 参数:
t- the object to write to the output messageheaders- the HTTP output headersresult- the HTTP output body- 抛出:
Exception- in case of I/O or conversion errors
-