abstractunmarshallerimpl.html
来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 1,095 行 · 第 1/5 页
HTML
1,095 行
<CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(java.net.URL)">unmarshal</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A> url)</CODE><BR> Unmarshal XML data from the specified URL and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(javax.xml.stream.XMLEventReader)">unmarshal</A></B>(<A HREF="../../../../javax/xml/stream/XMLEventReader.html" title="interface in javax.xml.stream">XMLEventReader</A> reader)</CODE><BR> Unmarshal XML data from the specified pull parser and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""><TR ALIGN="right" VALIGN=""><TD NOWRAP><FONT SIZE="-1"><CODE><T> <A HREF="../../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A><T></CODE></FONT></TD></TR></TABLE></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(javax.xml.stream.XMLEventReader, java.lang.Class)">unmarshal</A></B>(<A HREF="../../../../javax/xml/stream/XMLEventReader.html" title="interface in javax.xml.stream">XMLEventReader</A> reader, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><T> expectedType)</CODE><BR> Unmarshal root element to JAXB mapped <tt>declaredType</tt> and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected abstract <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></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>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/org/xml/sax/XMLReader.html" title="class or interface in org.xml.sax">XMLReader</A> reader, <A HREF="http://java.sun.com/j2se/1.5/docs/api/org/xml/sax/InputSource.html" title="class or interface in org.xml.sax">InputSource</A> source)</CODE><BR> Unmarshals an object by using the specified XMLReader and the InputSource.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(javax.xml.stream.XMLStreamReader)">unmarshal</A></B>(<A HREF="../../../../javax/xml/stream/XMLStreamReader.html" title="interface in javax.xml.stream">XMLStreamReader</A> reader)</CODE><BR> Unmarshal XML data from the specified pull parser and return the resulting content tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""><TR ALIGN="right" VALIGN=""><TD NOWRAP><FONT SIZE="-1"><CODE><T> <A HREF="../../../../javax/xml/bind/JAXBElement.html" title="class in javax.xml.bind">JAXBElement</A><T></CODE></FONT></TD></TR></TABLE></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/bind/helpers/AbstractUnmarshallerImpl.html#unmarshal(javax.xml.stream.XMLStreamReader, java.lang.Class)">unmarshal</A></B>(<A HREF="../../../../javax/xml/stream/XMLStreamReader.html" title="interface in javax.xml.stream">XMLStreamReader</A> reader, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><T> expectedType)</CODE><BR> Unmarshal root element to JAXB mapped <tt>declaredType</tt> and return the resulting content tree.</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.<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></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><!-- ============ FIELD DETAIL =========== --><A NAME="field_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>Field Detail</B></FONT></TH></TR></TABLE><A NAME="validating"><!-- --></A><H3>validating</H3><PRE>protected boolean <B>validating</B></PRE><DL><DD>whether or not the unmarshaller will validate<P><DL></DL></DL><!-- ========= 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></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 <A HREF="http://java.sun.com/j2se/1.5/docs/api/org/xml/sax/XMLReader.html" title="class or interface in org.xml.sax">XMLReader</A> <B>getXMLReader</B>() throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE><DL><DD>Obtains a configured XMLReader. This method is used when the client-specified <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/sax/SAXSource.html" title="class or interface in javax.xml.transform.sax"><CODE>SAXSource</CODE></A> object doesn't have XMLReader. <A HREF="../../../../javax/xml/bind/Unmarshaller.html" title="interface in javax.xml.bind"><CODE>Unmarshaller</CODE></A> is not re-entrant, so we will only use one instance of XMLReader.<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></DL></DD></DL><HR><A NAME="unmarshal(javax.xml.transform.Source)"><!-- --></A><H3>unmarshal</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>unmarshal</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/transform/Source.html" title="class or interface in javax.xml.transform">Source</A> source) 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>Unmarshal XML data from the specified XML Source and return the resulting content tree. <p> Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>. <p> <a name="saxParserPlugable"></a> <b>SAX 2.0 Parser Pluggability</b> <p> A client application can choose not to use the default parser mechanism supplied with their JAXB provider. Any SAX 2.0 compliant parser can be substituted for the JAXB provider's default mechanism. To do so, the client application must properly configure a <tt>SAXSource</tt> containing an <tt>XMLReader</tt> implemented by the SAX 2.0 parser provider. If the <tt>XMLReader</tt> has an <tt>org.xml.sax.ErrorHandler</tt> registered on it, it will be replaced by the JAXB Provider so that validation errors can be reported via the <tt>ValidationEventHandler</tt> mechanism of JAXB. If the <tt>SAXSource</tt> does not contain an <tt>XMLReader</tt>, then the JAXB provider's default parser mechanism will be used. <p> This parser replacement mechanism can also be used to replace the JAXB provider's unmarshal-time validation engine. The client application must properly configure their SAX 2.0 compliant parser to perform validation (as shown in the example above). Any <tt>SAXParserExceptions </tt> encountered by the parser during the unmarshal operation will be processed by the JAXB provider and converted into JAXB <tt>ValidationEvent</tt> objects which will be reported back to the client via the <tt>ValidationEventHandler</tt> registered with the <tt>Unmarshaller</tt>. <i>Note:</i> specifying a substitute validating SAX 2.0 parser for unmarshalling does not necessarily replace the validation engine used by the JAXB provider for performing on-demand validation. <p> The only way for a client application to specify an alternate parser mechanism to be used during unmarshal is via the <tt>unmarshal(SAXSource)</tt> API. All other forms of the unmarshal method (File, URL, Node, etc) will use the JAXB provider's default parser and validator mechanisms.<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>source</CODE> - the XML Source to unmarshal XML data from (providers are only required to support SAXSource, DOMSource, and StreamSource)<DT><B>Returns:</B><DD>the newly created root object of the java content tree<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - If any unexpected errors occur while unmarshalling
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?