javax.xml.bind.util
Class JAXBResult

java.lang.Object
  extended by javax.xml.transform.sax.SAXResult
      extended by javax.xml.bind.util.JAXBResult
All Implemented Interfaces:
javax.xml.transform.Result

public class JAXBResult
extends javax.xml.transform.sax.SAXResult

Utility class that allows to catch the result of a stylesheet transformation in a JAXB object.

Since:
JAXB1.0
Author:
JSR-31

Field Summary
 
Fields inherited from class javax.xml.transform.sax.SAXResult
FEATURE
 
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
 
Constructor Summary
JAXBResult(JAXBContext pContext)
          Creates a new instance of JAXBResult.
JAXBResult(Unmarshaller pUnmarshaller)
          Creates a new instance of JAXBResult.
 
Method Summary
 java.lang.Object getResult()
          Returns the result of a previous transformation.
 
Methods inherited from class javax.xml.transform.sax.SAXResult
getHandler, getLexicalHandler, getSystemId, setHandler, setLexicalHandler, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXBResult

public JAXBResult(JAXBContext pContext)
           throws JAXBException

Creates a new instance of JAXBResult. The instance will use the specified JAXBContext to create an Unmarshaller.

Throws:
JAXBException

JAXBResult

public JAXBResult(Unmarshaller pUnmarshaller)
           throws JAXBException

Creates a new instance of JAXBResult. The instance will use the given Unmarshaller to create a ContentHandler.

In most cases you will use the constructor taking a JAXBContext as input. This additional constructor is required, if you want to configure the Unmarshaller.

Parameters:
pUnmarshaller - The Unmarshaller that may be queried for an UnmarshallerHandler.
Throws:
JAXBException
Method Detail

getResult

public java.lang.Object getResult()
                           throws JAXBException

Returns the result of a previous transformation.

Throws:
JAXBException