Skip navigation links

Oracle® Database XML Java API Reference
11g Release 1 (11.1)

B28391-01


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:
Result

public class JAXBResult
extends SAXResult

JAXP Result implementation that unmarshals a JAXB object.

The user shouldn't call the methods defined in the SAXResult class.


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 context)
          Creates a new instance that uses the specified JAXBContext to unmarshal.
JAXBResult(Unmarshaller _unmarshaller)
          Creates a new instance that uses the specified Unmarshaler to unmarshal an object.

 

Method Summary
 java.lang.Object getResult()
          Gets the unmarshalled object created by the 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 context)
           throws JAXBException
Creates a new instance that uses the specified JAXBContext to unmarshal.
Throws:
JAXBException - If it fails to create a new unmarshaller from the specified JAXBContext.

JAXBResult

public JAXBResult(Unmarshaller _unmarshaller)
Creates a new instance that uses the specified Unmarshaler to unmarshal an object.

This JAXBResult object will use the specified Unmarshaller instance. It is the caller's responsibility not to use the same Unmarshaller for other purposes while it is being used by this object.

The primary purpose of this method is to allow the client to configure Unmarshaller. Unless you know what you are doing, it's easier and safer to pass a JAXBContext.

Method Detail

getResult

public java.lang.Object getResult()
                           throws JAXBException
Gets the unmarshalled object created by the transformation.
Returns:
Always return a non-null object.
Throws:
JAXBException - If unmarshalling fails.

Skip navigation links

Oracle® Database XML Java API Reference
11g Release 1 (11.1)

B28391-01


Copyright © 2001 Sun Microsystems, Inc. All rights reserved.