public class JaxbJavaee
extends java.lang.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 java.lang.ThreadLocal<java.util.Set<java.lang.String>> |
currentPublicId |
| Constructor and Description |
|---|
JaxbJavaee() |
| Modifier and Type | Method and Description |
|---|---|
static <T> JAXBContext |
getContext(java.lang.Class<T> type) |
static <T> java.lang.String |
marshal(java.lang.Class<T> type,
java.lang.Object object) |
static <T> void |
marshal(java.lang.Class<T> type,
java.lang.Object object,
java.io.OutputStream out) |
static <T> java.lang.Object |
unmarshal(java.lang.Class<T> type,
java.io.InputStream in)
It unmarshals, but not using the
JaxbJavaee.JavaeeNamespaceFilter |
static <T> java.lang.Object |
unmarshal(java.lang.Class<T> type,
java.io.InputStream in,
boolean validate)
Read in a T from the input stream.
|
static <T> java.lang.Object |
unmarshalHandlerChains(java.lang.Class<T> type,
java.io.InputStream in) |
static <T> java.lang.Object |
unmarshalJavaee(java.lang.Class<T> type,
java.io.InputStream in)
Convert the namespaceURI in the input to the javaee URI, do not validate the xml, and read in a T.
|
static <T> java.lang.Object |
unmarshalTaglib(java.lang.Class<T> type,
java.io.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,
java.io.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 java.lang.ThreadLocal<java.util.Set<java.lang.String>> currentPublicId
public static <T> java.lang.String marshal(java.lang.Class<T> type,
java.lang.Object object)
throws JAXBException
JAXBExceptionpublic static <T> void marshal(java.lang.Class<T> type,
java.lang.Object object,
java.io.OutputStream out)
throws JAXBException
JAXBExceptionpublic static <T> JAXBContext getContext(java.lang.Class<T> type)
throws JAXBException
JAXBExceptionpublic static <T> java.lang.Object unmarshal(java.lang.Class<T> type,
java.io.InputStream in)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
JAXBException
JaxbJavaee.JavaeeNamespaceFilterT - class of object to be returnedtype - Class of object to be read inin - input stream to readjavax.xml.parsers.ParserConfigurationException - is the SAX parser can not be configuredorg.xml.sax.SAXException - if there is an xml problemJAXBException - if the xml cannot be marshalled into a T.public static <T> java.lang.Object unmarshalJavaee(java.lang.Class<T> type,
java.io.InputStream in)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
JAXBException
T - class of object to be returnedtype - Class of object to be read inin - input stream to readjavax.xml.parsers.ParserConfigurationException - is the SAX parser can not be configuredorg.xml.sax.SAXException - if there is an xml problemJAXBException - if the xml cannot be marshalled into a T.public static <T> java.lang.Object unmarshal(java.lang.Class<T> type,
java.io.InputStream in,
boolean validate)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.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.javax.xml.parsers.ParserConfigurationException - is the SAX parser can not be configuredorg.xml.sax.SAXException - if there is an xml problemJAXBException - if the xml cannot be marshalled into a T.public static <T> java.lang.Object unmarshalTaglib(java.lang.Class<T> type,
java.io.InputStream in)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
JAXBException
T - class of object to be returnedtype - Class of object to be read inin - input stream to readjavax.xml.parsers.ParserConfigurationException - is the SAX parser can not be configuredorg.xml.sax.SAXException - if there is an xml problemJAXBException - if the xml cannot be marshalled into a T.public static <T> java.lang.Object unmarshalHandlerChains(java.lang.Class<T> type,
java.io.InputStream in)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
JAXBException
T - class of object to be returnedtype - Class of object to be read inin - input stream to readjavax.xml.parsers.ParserConfigurationException - is the SAX parser can not be configuredorg.xml.sax.SAXException - if there is an xml problemJAXBException - if the xml cannot be marshalled into a T.public static void validateJavaee(JavaeeSchema type, java.io.InputStream in) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
type - in - javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException