org.jasig.springframework.http.converter.xml
Class JaxbMarshallingHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<T>
org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<Object>
org.jasig.springframework.http.converter.xml.JaxbMarshallingHttpMessageConverter
- All Implemented Interfaces:
- org.springframework.http.converter.HttpMessageConverter<Object>
public class JaxbMarshallingHttpMessageConverter
- extends org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<Object>
XML message converter that uses a JAXBContext directly. The Class specified to readFromSource(Class, HttpHeaders, Source)
is passed to the Unmarshaller.unmarshal(Source, Class) method to help with parsing of XML that doesn't include namespace information.
Note that supports(Class) returns true for ALL Classes so this converter should only be used in a limited scope
- Author:
- Eric Dalquist
| Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter |
logger |
| 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, getContentLength, getDefaultContentType, getSupportedMediaTypes, read, setSupportedMediaTypes, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JaxbMarshallingHttpMessageConverter
public JaxbMarshallingHttpMessageConverter(JAXBContext jaxbContext)
supports
public boolean supports(Class<?> clazz)
- Specified by:
supports in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>
readFromSource
protected Object readFromSource(Class<?> clazz,
org.springframework.http.HttpHeaders headers,
Source source)
throws IOException
- Specified by:
readFromSource in class org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<Object>
- Throws:
IOException
writeToResult
protected void writeToResult(Object o,
org.springframework.http.HttpHeaders headers,
Result result)
throws IOException
- Specified by:
writeToResult in class org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<Object>
- Throws:
IOException
Copyright © 2013 Jasig. All Rights Reserved.