public class JaxbJavaee extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JaxbJavaee.HandlerChainsNamespaceFilter |
static class |
JaxbJavaee.Javaee6SchemaFilter |
static class |
JaxbJavaee.JavaeeNamespaceFilter |
static class |
JaxbJavaee.NoSourceFilter |
static class |
JaxbJavaee.TaglibNamespaceFilter |
| Modifier and Type | Field and Description |
|---|---|
static ThreadLocal<Set<String>> |
currentPublicId |
| Constructor and Description |
|---|
JaxbJavaee() |
| Modifier and Type | Method and Description |
|---|---|
static <T> JAXBContext |
getContext(Class<T> type) |
static <T> String |
marshal(Class<T> type,
Object object) |
static <T> void |
marshal(Class<T> type,
Object object,
OutputStream out) |
static <T> Object |
unmarshal(Class<T> type,
InputStream in,
boolean validate)
Read in a T from the input stream.
|
static <T> Object |
unmarshalHandlerChains(Class<T> type,
InputStream in) |
static <T> Object |
unmarshalJavaee(Class<T> type,
InputStream in)
Convert the namespaceURI in the input to the javaee URI, do not validate the xml, and read in a T.
|
static <T> Object |
unmarshalTaglib(Class<T> type,
InputStream in)
Convert the namespaceURI in the input to the taglib URI, do not validate the xml, and read in a T.
|
static void |
validateJavaee(JavaeeSchema type,
InputStream in)
validate the inputStream, which should be a Java EE standard deployment descriptor against its schema type
Note, this method will use the new Java EE 6 schema to validate the old descriptors after changing their namespace and version.
|
public static final ThreadLocal<Set<String>> currentPublicId
public static <T> String marshal(Class<T> type, Object object) throws JAXBException
JAXBExceptionpublic static <T> void marshal(Class<T> type, Object object, OutputStream out) throws JAXBException
JAXBExceptionpublic static <T> JAXBContext getContext(Class<T> type) throws JAXBException
JAXBExceptionpublic static <T> Object unmarshalJavaee(Class<T> type, InputStream in) throws ParserConfigurationException, SAXException, JAXBException
T - class of object to be returnedtype - Class of object to be read inin - input stream to readParserConfigurationException - is the SAX parser can not be configuredSAXException - if there is an xml problemJAXBException - if the xml cannot be marshalled into a T.public static <T> Object unmarshal(Class<T> type, InputStream in, boolean validate) throws ParserConfigurationException, SAXException, JAXBException
T - class of object to be returnedtype - Class of object to be read inin - input stream to readvalidate - whether to validate the input.ParserConfigurationException - is the SAX parser can not be configuredSAXException - if there is an xml problemJAXBException - if the xml cannot be marshalled into a T.public static <T> Object unmarshalTaglib(Class<T> type, InputStream in) throws ParserConfigurationException, SAXException, JAXBException
T - class of object to be returnedtype - Class of object to be read inin - input stream to readParserConfigurationException - is the SAX parser can not be configuredSAXException - if there is an xml problemJAXBException - if the xml cannot be marshalled into a T.public static <T> Object unmarshalHandlerChains(Class<T> type, InputStream in) throws ParserConfigurationException, SAXException, JAXBException
T - class of object to be returnedtype - Class of object to be read inin - input stream to readParserConfigurationException - is the SAX parser can not be configuredSAXException - if there is an xml problemJAXBException - if the xml cannot be marshalled into a T.public static void validateJavaee(JavaeeSchema type, InputStream in) throws ParserConfigurationException, SAXException, IOException
type - in - ParserConfigurationExceptionSAXExceptionIOExceptionCopyright © 1999-2014 The Apache Software Foundation. All Rights Reserved.