Class JaxbJavaee


  • public class JaxbJavaee
    extends Object
    Version:
    $Rev$ $Date$
    • Constructor Detail

      • JaxbJavaee

        public JaxbJavaee()
    • Method Detail

      • marshal

        public static <T> String marshal​(Class<T> type,
                                         Object object)
                                  throws jakarta.xml.bind.JAXBException
        Throws:
        jakarta.xml.bind.JAXBException
      • marshal

        public static <T> void marshal​(Class<T> type,
                                       Object object,
                                       OutputStream out)
                                throws jakarta.xml.bind.JAXBException
        Throws:
        jakarta.xml.bind.JAXBException
      • getContext

        public static <T> jakarta.xml.bind.JAXBContext getContext​(Class<T> type)
                                                           throws jakarta.xml.bind.JAXBException
        Throws:
        jakarta.xml.bind.JAXBException
      • unmarshalJavaee

        public static <T> Object unmarshalJavaee​(Class<T> type,
                                                 InputStream in)
                                          throws ParserConfigurationException,
                                                 SAXException,
                                                 jakarta.xml.bind.JAXBException
        Convert the namespaceURI in the input to the javaee URI, do not validate the xml, and read in a T.
        Type Parameters:
        T - class of object to be returned
        Parameters:
        type - Class of object to be read in
        in - input stream to read
        Returns:
        a T read from the input stream
        Throws:
        ParserConfigurationException - is the SAX parser can not be configured
        SAXException - if there is an xml problem
        jakarta.xml.bind.JAXBException - if the xml cannot be marshalled into a T.
      • unmarshal

        public static <T> Object unmarshal​(Class<T> type,
                                           InputStream in,
                                           boolean validate)
                                    throws ParserConfigurationException,
                                           SAXException,
                                           jakarta.xml.bind.JAXBException
        Read in a T from the input stream.
        Type Parameters:
        T - class of object to be returned
        Parameters:
        type - Class of object to be read in
        in - input stream to read
        validate - whether to validate the input.
        Returns:
        a T read from the input stream
        Throws:
        ParserConfigurationException - is the SAX parser can not be configured
        SAXException - if there is an xml problem
        jakarta.xml.bind.JAXBException - if the xml cannot be marshalled into a T.
      • unmarshalTaglib

        public static <T> Object unmarshalTaglib​(Class<T> type,
                                                 InputStream in)
                                          throws ParserConfigurationException,
                                                 SAXException,
                                                 jakarta.xml.bind.JAXBException
        Convert the namespaceURI in the input to the taglib URI, do not validate the xml, and read in a T.
        Type Parameters:
        T - class of object to be returned
        Parameters:
        type - Class of object to be read in
        in - input stream to read
        Returns:
        a T read from the input stream
        Throws:
        ParserConfigurationException - is the SAX parser can not be configured
        SAXException - if there is an xml problem
        jakarta.xml.bind.JAXBException - if the xml cannot be marshalled into a T.
      • unmarshalHandlerChains

        public static <T> Object unmarshalHandlerChains​(Class<T> type,
                                                        InputStream in)
                                                 throws ParserConfigurationException,
                                                        SAXException,
                                                        jakarta.xml.bind.JAXBException
        Type Parameters:
        T - class of object to be returned
        Parameters:
        type - Class of object to be read in
        in - input stream to read
        Returns:
        a T read from the input stream
        Throws:
        ParserConfigurationException - is the SAX parser can not be configured
        SAXException - if there is an xml problem
        jakarta.xml.bind.JAXBException - if the xml cannot be marshalled into a T.