<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_18) on Sat Dec 04 05:26:33 UTC 2010 --> <TITLE> AbstractUnmarshallerImpl </TITLE> <META NAME="date" CONTENT="2010-12-04"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="AbstractUnmarshallerImpl"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../javax/xml/bind/helpers/AbstractMarshallerImpl.html" title="class in javax.xml.bind.helpers"><B>PREV CLASS</B></A> <A HREF="../../../../javax/xml/bind/helpers/DefaultValidationEventHandler.html" title="class in javax.xml.bind.helpers"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?javax/xml/bind/helpers/AbstractUnmarshallerImpl.html" target="_top"><B>FRAMES</B></A> <A HREF="AbstractUnmarshallerImpl.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> javax.xml.bind.helpers</FONT> <BR> Class AbstractUnmarshallerImpl</H2> <PRE> java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>javax.xml.bind.helpers.AbstractUnmarshallerImpl</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></DD> </DL> <HR> <DL> <DT><PRE>public abstract class <B>AbstractUnmarshallerImpl</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></DL> </PRE> <P> <p>This is an abstract default implementation of an <A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind"><CODE>Unmarshaller</CODE></A>. Subclasses only need to implement <A HREF="../../../../javax/xml/bind/Unmarshaller.html#getUnmarshallerHandler()"><CODE>Unmarshaller.getUnmarshallerHandler()</CODE></A>, <A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.w3c.dom.Node)"><CODE>Unmarshaller.unmarshal(org.w3c.dom.Node)</CODE></A>, and <A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(org.xml.sax.XMLReader, org.xml.sax.InputSource)"><CODE>unmarshal(org.xml.sax.XMLReader, org.xml.sax.InputSource)</CODE></A>.</p> <P> <P> <DL> <DT><B>Since:</B></DT> <DD>JAXB1.0</DD> <DT><B>Author:</B></DT> <DD>JSR-31</DD> </DL> <HR> <P> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#AbstractUnmarshallerImpl()">AbstractUnmarshallerImpl</A></B>()</CODE> <BR> Creates a new instance of AbstractUnmarshallerImpl.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#createUnmarshalException(org.xml.sax.SAXException)">createUnmarshalException</A></B>(org.xml.sax.SAXException pException)</CODE> <BR> Helper method to concert a <CODE>SAXException</CODE> into an <A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind"><CODE>UnmarshalException</CODE></A>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#getEventHandler()">getEventHandler</A></B>()</CODE> <BR> If the JAXB application has registered a custom handler for validation events, returns that handler.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#getProperty(java.lang.String)">getProperty</A></B>(java.lang.String pName)</CODE> <BR> Always throws a <A HREF="../../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind"><CODE>PropertyException</CODE></A>, because the default implementation does not support any properties.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected org.xml.sax.XMLReader</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#getXMLReader()">getXMLReader</A></B>()</CODE> <BR> Creates a configured <CODE>XMLReader</CODE>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#isValidating()">isValidating</A></B>()</CODE> <BR> Sets whether the <code>Unmarshaller</code> is validating the objects that it reads.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#setEventHandler(javax.xml.bind.ValidationEventHandler)">setEventHandler</A></B>(<A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A> pHandler)</CODE> <BR> An application may customize the Unmarshallers behaviour in case of validation problems by supplying a custom handler for validation events.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A></B>(java.lang.String pName, java.lang.Object pValue)</CODE> <BR> Always throws a <A HREF="../../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind"><CODE>PropertyException</CODE></A>, because the default implementation does not support any properties.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#setValidating(boolean)">setValidating</A></B>(boolean pValidating)</CODE> <BR> Sets whether the <code>Unmarshaller</code> is validating the objects that it reads.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(java.io.File)">unmarshal</A></B>(java.io.File pFile)</CODE> <BR> This method takes opens the given file <code>pFile</code> for input.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(org.xml.sax.InputSource)">unmarshal</A></B>(org.xml.sax.InputSource pSource)</CODE> <BR> The Unmarshaller reads the byte stream or character stream referred by the <CODE>InputSource</CODE> and converts it into an equivalent JAXB object.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(java.io.InputStream)">unmarshal</A></B>(java.io.InputStream pSource)</CODE> <BR> The Unmarshaller reads the given byte stream and converts it into an equivalent JAXB object.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(javax.xml.transform.Source)">unmarshal</A></B>(javax.xml.transform.Source pSource)</CODE> <BR> The Unmarshaller reads the XML representation from the given <CODE>Source</CODE> and converts it into an equivalent JAXB object.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(java.net.URL)">unmarshal</A></B>(java.net.URL pURL)</CODE> <BR> This method takes connects to the given <code>pURL</code> and opens a byte stream for input.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected abstract java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(org.xml.sax.XMLReader, org.xml.sax.InputSource)">unmarshal</A></B>(org.xml.sax.XMLReader pReader, org.xml.sax.InputSource pSource)</CODE> <BR> Unmarshals an object by using the given instance of <CODE>XMLReader</CODE> to parse the XML document read from the byte or character stream given by the <CODE>InputSource</CODE> <code>pSource</code>.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_javax.xml.bind.Unmarshaller"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from interface javax.xml.bind.<A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#getUnmarshallerHandler()">getUnmarshallerHandler</A>, <A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.w3c.dom.Node)">unmarshal</A></CODE></TD> </TR> </TABLE> <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="AbstractUnmarshallerImpl()"><!-- --></A><H3> AbstractUnmarshallerImpl</H3> <PRE> public <B>AbstractUnmarshallerImpl</B>()</PRE> <DL> <DD><p>Creates a new instance of AbstractUnmarshallerImpl.</p> <P> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getXMLReader()"><!-- --></A><H3> getXMLReader</H3> <PRE> protected org.xml.sax.XMLReader <B>getXMLReader</B>() throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><p>Creates a configured <CODE>XMLReader</CODE>. Unmarshaller is not re-entrant, so we will use a single instance of <CODE>XMLReader</CODE>.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - Encapsulates a <CODE>ParserConfigurationException</CODE></DL> </DD> </DL> <HR> <A NAME="unmarshal(javax.xml.transform.Source)"><!-- --></A><H3> unmarshal</H3> <PRE> public java.lang.Object <B>unmarshal</B>(javax.xml.transform.Source pSource) throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source)">Unmarshaller</A></CODE></B></DD> <DD><p>The Unmarshaller reads the XML representation from the given <CODE>Source</CODE> and converts it into an equivalent JAXB object.</p> <p>The JAXB provider must support at least <CODE>SAXSource</CODE>, <CODE>DOMSource</CODE>, and <CODE>StreamSource</CODE>. A possible implementation could validate whether the argument is actually an instance of these subinterfaces. If so, it might simply act like <A HREF="../../../../javax/xml/bind/Unmarshaller.html#getUnmarshallerHandler()"><CODE>Unmarshaller.getUnmarshallerHandler()</CODE></A>, <A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.w3c.dom.Node)"><CODE>Unmarshaller.unmarshal(org.w3c.dom.Node)</CODE></A>, <A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.io.InputStream)"><CODE>Unmarshaller.unmarshal(java.io.InputStream)</CODE></A>, or <A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.xml.sax.InputSource)"><CODE>Unmarshaller.unmarshal(org.xml.sax.InputSource)</CODE></A>, respectively.</p> <p><em>Note</em>: If you are not using the standard JAXP mechanism for obtaining an <CODE>XMLReader</CODE>, then you might create your own SAX parser and invoke the <code>pSource</code> arguments <CODE>SAXSource.setXMLReader(org.xml.sax.XMLReader)</CODE>. The JAXB provider will detect and use your SAX parser.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source)">unmarshal</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pSource</CODE> - The <CODE>Source</CODE> being read. <DT><B>Returns:</B><DD>The JAXB object read from the DOM node. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - An unexpected problem occurred. <DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - The JAXB object is invalid or could not be read for similar reasons.</DL> </DD> </DL> <HR> <A NAME="unmarshal(org.xml.sax.XMLReader, org.xml.sax.InputSource)"><!-- --></A><H3> unmarshal</H3> <PRE> protected abstract java.lang.Object <B>unmarshal</B>(org.xml.sax.XMLReader pReader, org.xml.sax.InputSource pSource) throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><p>Unmarshals an object by using the given instance of <CODE>XMLReader</CODE> to parse the XML document read from the byte or character stream given by the <CODE>InputSource</CODE> <code>pSource</code>.</p> <p>The implementation should call the method <CODE>XMLReader.setErrorHandler(org.xml.sax.ErrorHandler)</CODE> in order to pass errors provided by the SAX parser to the <A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> provided by the client.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - An error occurred while unmarshalling the JAXB object.</DL> </DD> </DL> <HR> <A NAME="unmarshal(org.xml.sax.InputSource)"><!-- --></A><H3> unmarshal</H3> <PRE> public final java.lang.Object <B>unmarshal</B>(org.xml.sax.InputSource pSource) throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.xml.sax.InputSource)">Unmarshaller</A></CODE></B></DD> <DD><p>The Unmarshaller reads the byte stream or character stream referred by the <CODE>InputSource</CODE> and converts it into an equivalent JAXB object.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(org.xml.sax.InputSource)">unmarshal</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pSource</CODE> - The <CODE>InputSource</CODE> referring to a byte or character stream. It is recommended, that the system ID is set. This may be required, if the XML in the stream refers to external entities. <DT><B>Returns:</B><DD>The JAXB object read from the byte or character stream. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - An unexpected problem (for example an IOException) occurred. <DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - The JAXB object is invalid or could not be read from the byte stream for similar reasons.</DL> </DD> </DL> <HR> <A NAME="unmarshal(java.net.URL)"><!-- --></A><H3> unmarshal</H3> <PRE> public final java.lang.Object <B>unmarshal</B>(java.net.URL pURL) throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.net.URL)">Unmarshaller</A></CODE></B></DD> <DD><p>This method takes connects to the given <code>pURL</code> and opens a byte stream for input. The Unmarshaller reads the byte stream and converts it into an equivalent JAXB object.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.net.URL)">unmarshal</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pURL</CODE> - The URL being read. <DT><B>Returns:</B><DD>The JAXB object read from the URL. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - An unexpected problem (for example an IOException) occurred. <DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - The JAXB object is invalid or could not be read from the byte stream for similar reasons.</DL> </DD> </DL> <HR> <A NAME="unmarshal(java.io.File)"><!-- --></A><H3> unmarshal</H3> <PRE> public final java.lang.Object <B>unmarshal</B>(java.io.File pFile) throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.io.File)">Unmarshaller</A></CODE></B></DD> <DD><p>This method takes opens the given file <code>pFile</code> for input. The Unmarshaller reads the byte stream contained in the file and converts it into an equivalent JAXB object.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.io.File)">unmarshal</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pFile</CODE> - The file being read. <DT><B>Returns:</B><DD>The JAXB object read from the file. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - An unexpected problem (for example an IOException) occurred. <DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - The JAXB object is invalid or could not be read from the byte stream for similar reasons.</DL> </DD> </DL> <HR> <A NAME="unmarshal(java.io.InputStream)"><!-- --></A><H3> unmarshal</H3> <PRE> public final java.lang.Object <B>unmarshal</B>(java.io.InputStream pSource) throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.io.InputStream)">Unmarshaller</A></CODE></B></DD> <DD><p>The Unmarshaller reads the given byte stream and converts it into an equivalent JAXB object.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.io.InputStream)">unmarshal</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pSource</CODE> - The stream being read. <DT><B>Returns:</B><DD>The JAXB object read from the byte stream. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - An unexpected problem (for example an IOException) occurred. <DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - The JAXB object is invalid or could not be read from the byte stream for similar reasons.</DL> </DD> </DL> <HR> <A NAME="isValidating()"><!-- --></A><H3> isValidating</H3> <PRE> public boolean <B>isValidating</B>() throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#isValidating()">Unmarshaller</A></CODE></B></DD> <DD><p>Sets whether the <code>Unmarshaller</code> is validating the objects that it reads. The default is false.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#isValidating()">isValidating</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>True, if the <code>Unmarshaller</code> is validating the objects that it reads, false otherwise. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - Fetching the property value failed.<DT><B>See Also:</B><DD><A HREF="../../../../javax/xml/bind/Unmarshaller.html#setValidating(boolean)"><CODE>Unmarshaller.setValidating(boolean)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setValidating(boolean)"><!-- --></A><H3> setValidating</H3> <PRE> public void <B>setValidating</B>(boolean pValidating) throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#setValidating(boolean)">Unmarshaller</A></CODE></B></DD> <DD><p>Sets whether the <code>Unmarshaller</code> is validating the objects that it reads. The default is false.</p> <p><em>Note</em>: A validating unmarshaller will rarely use a validating SAX parser by default! It does so, because the SAX parsers validation and the Unmarshallers builtin validation would most probably validate the same things, resulting in no additional safety at the cost of wasting performance. Second, a SAX parser is not always in use. For example, you do not need a parser when converting a DOM Node. If you insist in a validating XML parser, then you should create your own <CODE>XMLReader</CODE> and use the method <A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source)"><CODE>Unmarshaller.unmarshal(javax.xml.transform.Source)</CODE></A>.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#setValidating(boolean)">setValidating</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pValidating</CODE> - Whether the <code>Unmarshaller</code> should validate or not. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - Setting the property failed.</DL> </DD> </DL> <HR> <A NAME="getEventHandler()"><!-- --></A><H3> getEventHandler</H3> <PRE> public <A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A> <B>getEventHandler</B>() throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#getEventHandler()">Unmarshaller</A></CODE></B></DD> <DD><p>If the JAXB application has registered a custom handler for validation events, returns that handler. Otherwise returns the default handler, which is triggering an exception in case of errors and fatal errors.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#getEventHandler()">getEventHandler</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE></DL> </DD> </DL> <HR> <A NAME="setEventHandler(javax.xml.bind.ValidationEventHandler)"><!-- --></A><H3> setEventHandler</H3> <PRE> public void <B>setEventHandler</B>(<A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind">ValidationEventHandler</A> pHandler) throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#setEventHandler(javax.xml.bind.ValidationEventHandler)">Unmarshaller</A></CODE></B></DD> <DD><p>An application may customize the Unmarshallers behaviour in case of validation problems by supplying a custom handler for validation events. The default handler will trigger an exception in case of errors and fatal errors.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#setEventHandler(javax.xml.bind.ValidationEventHandler)">setEventHandler</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pHandler</CODE> - The custom event handler or null to restore the default event handler. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - Setting the handler failed.</DL> </DD> </DL> <HR> <A NAME="createUnmarshalException(org.xml.sax.SAXException)"><!-- --></A><H3> createUnmarshalException</H3> <PRE> protected <A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A> <B>createUnmarshalException</B>(org.xml.sax.SAXException pException)</PRE> <DL> <DD><p>Helper method to concert a <CODE>SAXException</CODE> into an <A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind"><CODE>UnmarshalException</CODE></A>.</p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pException</CODE> - If the parameter contains a nested instance of <A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind"><CODE>UnmarshalException</CODE></A>, throws that instance. Otherwise wraps the parameter in a new <A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind"><CODE>UnmarshalException</CODE></A> and throws that.</DL> </DD> </DL> <HR> <A NAME="setProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3> setProperty</H3> <PRE> public void <B>setProperty</B>(java.lang.String pName, java.lang.Object pValue) throws <A HREF="../../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></PRE> <DL> <DD><p>Always throws a <A HREF="../../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind"><CODE>PropertyException</CODE></A>, because the default implementation does not support any properties. If you want to change this, override the class.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pName</CODE> - The property name. <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - The property name was null. <DD><CODE><A HREF="../../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></CODE> - The name was not null. :-)</DL> </DD> </DL> <HR> <A NAME="getProperty(java.lang.String)"><!-- --></A><H3> getProperty</H3> <PRE> public java.lang.Object <B>getProperty</B>(java.lang.String pName) throws <A HREF="../../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></PRE> <DL> <DD><p>Always throws a <A HREF="../../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind"><CODE>PropertyException</CODE></A>, because the default implementation does not support any properties. If you want to change this, override the class.</p> <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#getProperty(java.lang.String)">getProperty</A></CODE> in interface <CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind">Unmarshaller</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>pName</CODE> - The property name. <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - The property name was null. <DD><CODE><A HREF="../../../../javax/xml/bind/PropertyException.html" title="class in javax.xml.bind">PropertyException</A></CODE> - The name was not null. :-)</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../javax/xml/bind/helpers/AbstractMarshallerImpl.html" title="class in javax.xml.bind.helpers"><B>PREV CLASS</B></A> <A HREF="../../../../javax/xml/bind/helpers/DefaultValidationEventHandler.html" title="class in javax.xml.bind.helpers"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?javax/xml/bind/helpers/AbstractUnmarshallerImpl.html" target="_top"><B>FRAMES</B></A> <A HREF="AbstractUnmarshallerImpl.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>