| Constructor and Description |
|---|
JaxbHttpMessageConverter() |
JaxbHttpMessageConverter(String packagesToInclude)
Create a JAXB message converter, specifying the Java packages it should use to find JAXB classes
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Class<?> clazz,
org.springframework.http.MediaType mediaType) |
boolean |
canWrite(Class<?> clazz,
org.springframework.http.MediaType mediaType) |
protected boolean |
canWrite(org.springframework.http.MediaType mediaType) |
protected Marshaller |
createMarshaller(Class<?> clazz)
Creates a new
Marshaller for the given class. |
protected Unmarshaller |
createUnmarshaller(Class<?> clazz)
Creates a new
Unmarshaller for the given class. |
protected JAXBContext |
getJaxbContext(Class<?> clazz)
Returns a
JAXBContext for the given class. |
protected Object |
readFromSource(Class<?> clazz,
org.springframework.http.HttpHeaders headers,
Source source) |
protected boolean |
supports(Class<?> clazz) |
protected void |
writeToResult(Object o,
org.springframework.http.HttpHeaders headers,
Result result) |
readInternal, transform, writeInternalpublic JaxbHttpMessageConverter()
public JaxbHttpMessageConverter(String packagesToInclude)
packagesToInclude - A colon-separated list of package names.JAXBContext.newInstance(String)public boolean canRead(Class<?> clazz, org.springframework.http.MediaType mediaType)
public boolean canWrite(Class<?> clazz, org.springframework.http.MediaType mediaType)
protected boolean supports(Class<?> clazz)
supports in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>protected boolean canWrite(org.springframework.http.MediaType mediaType)
canWrite in class org.springframework.http.converter.AbstractHttpMessageConverter<Object>protected Object readFromSource(Class<?> clazz, org.springframework.http.HttpHeaders headers, Source source) throws IOException
readFromSource in class org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<Object>IOExceptionprotected void writeToResult(Object o, org.springframework.http.HttpHeaders headers, Result result) throws IOException
writeToResult in class org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<Object>IOExceptionprotected final Marshaller createMarshaller(Class<?> clazz)
Marshaller for the given class.clazz - the class to create the marshaller forMarshallerorg.springframework.http.converter.HttpMessageConversionException - in case of JAXB errorsprotected final Unmarshaller createUnmarshaller(Class<?> clazz) throws JAXBException
Unmarshaller for the given class.clazz - the class to create the unmarshaller forUnmarshallerorg.springframework.http.converter.HttpMessageConversionException - in case of JAXB errorsJAXBExceptionprotected final JAXBContext getJaxbContext(Class<?> clazz)
JAXBContext for the given class.clazz - the class to return the context forJAXBContextorg.springframework.http.converter.HttpMessageConversionException - in case of JAXB errorsCopyright © 2005–2014 Alfresco Software. All rights reserved.