org.glassfish.jersey.server.wadl.internal
Class WadlUtils

java.lang.Object
  extended by org.glassfish.jersey.server.wadl.internal.WadlUtils

public class WadlUtils
extends Object

Utils for wadl processing.

Author:
Miroslav Fuksa (miroslav.fuksa at oracle.com)

Constructor Summary
WadlUtils()
           
 
Method Summary
static
<T> T
unmarshall(InputStream inputStream, SAXParserFactory saxParserFactory, Class<T> resultClass)
          Unmarshal a jaxb bean into a type of resultClass from the given inputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WadlUtils

public WadlUtils()
Method Detail

unmarshall

public static <T> T unmarshall(InputStream inputStream,
                               SAXParserFactory saxParserFactory,
                               Class<T> resultClass)
                    throws JAXBException,
                           ParserConfigurationException,
                           SAXException
Unmarshal a jaxb bean into a type of resultClass from the given inputStream.

Type Parameters:
T - Type of the result jaxb bean.
Parameters:
inputStream - Input stream that contains input xml that should be processed.
saxParserFactory - Sax parser factory for unmarshalling xml.
resultClass - Class of the result bean into which the content of inputStream should be unmarshalled.
Returns:
Unmarshalled jaxb bean.
Throws:
JAXBException - In case of jaxb problem.
ParserConfigurationException - In case of problem with parsing xml.
SAXException - In case of problem with parsing xml.


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.