abstractunmarshallerimpl.html
来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 1,095 行 · 第 1/5 页
HTML
1,095 行
<DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> returns false from its <tt>handleEvent</tt> method or the <tt>Unmarshaller</tt> is unable to perform the XML to Java binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a><DT><B>See Also:</B><DD><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(javax.xml.transform.Source, java.lang.Class)"><CODE>Unmarshaller.unmarshal(javax.xml.transform.Source, Class)</CODE></A></DL></DD></DL><HR><A NAME="unmarshal(org.xml.sax.XMLReader, org.xml.sax.InputSource)"><!-- --></A><H3>unmarshal</H3><PRE>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> <B>unmarshal</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) throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE><DL><DD>Unmarshals an object by using the specified XMLReader and the InputSource. The callee should call the setErrorHandler method of the XMLReader so that errors are passed to the client-specified ValidationEventHandler.<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(org.xml.sax.InputSource)"><!-- --></A><H3>unmarshal</H3><PRE>public final <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/org/xml/sax/InputSource.html" title="class or interface in org.xml.sax">InputSource</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(org.xml.sax.InputSource)">Unmarshaller</A></CODE></B></DD><DD>Unmarshal XML data from the specified SAX InputSource and return the resulting content tree. <p> Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.<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>source</CODE> - the input source to unmarshal XML data from<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<DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> returns false from its <tt>handleEvent</tt> method or the <tt>Unmarshaller</tt> is unable to perform the XML to Java binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></DL></DD></DL><HR><A NAME="unmarshal(java.net.URL)"><!-- --></A><H3>unmarshal</H3><PRE>public final <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/java/net/URL.html" title="class or interface in java.net">URL</A> url) 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>Unmarshal XML data from the specified URL and return the resulting content tree. <p> Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.<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>url</CODE> - the url to unmarshal XML data from<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<DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> returns false from its <tt>handleEvent</tt> method or the <tt>Unmarshaller</tt> is unable to perform the XML to Java binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></DL></DD></DL><HR><A NAME="unmarshal(java.io.File)"><!-- --></A><H3>unmarshal</H3><PRE>public final <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/java/io/File.html" title="class or interface in java.io">File</A> f) 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>Unmarshal XML data from the specified file and return the resulting content tree. <p> Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.<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>f</CODE> - the file to unmarshal XML data from<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<DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> returns false from its <tt>handleEvent</tt> method or the <tt>Unmarshaller</tt> is unable to perform the XML to Java binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></DL></DD></DL><HR><A NAME="unmarshal(java.io.InputStream)"><!-- --></A><H3>unmarshal</H3><PRE>public final <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/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> is) 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>Unmarshal XML data from the specified InputStream and return the resulting content tree. Validation event location information may be incomplete when using this form of the unmarshal API. <p> Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.<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>is</CODE> - the InputStream to unmarshal XML data from<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<DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> returns false from its <tt>handleEvent</tt> method or the <tt>Unmarshaller</tt> is unable to perform the XML to Java binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></DL></DD></DL><HR><A NAME="unmarshal(java.io.Reader)"><!-- --></A><H3>unmarshal</H3><PRE>public final <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/java/io/Reader.html" title="class or interface in java.io">Reader</A> reader) 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.Reader)">Unmarshaller</A></CODE></B></DD><DD>Unmarshal XML data from the specified Reader and return the resulting content tree. Validation event location information may be incomplete when using this form of the unmarshal API, because a Reader does not provide the system ID. <p> Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../javax/xml/bind/Unmarshaller.html#unmarshal(java.io.Reader)">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>reader</CODE> - the Reader to unmarshal XML data from<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<DD><CODE><A HREF="../../../../javax/xml/bind/UnmarshalException.html" title="class in javax.xml.bind">UnmarshalException</A></CODE> - If the <A HREF="../../../../javax/xml/bind/ValidationEventHandler.html" title="interface in javax.xml.bind"><CODE>ValidationEventHandler</CODE></A> returns false from its <tt>handleEvent</tt> method or the <tt>Unmarshaller</tt> is unable to perform the XML to Java binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a></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>Indicates whether or not the Unmarshaller is configured to validate during unmarshal operations. <p> <i><b>Note:</b> I named this method isValidating() to stay in-line with JAXP, as opposed to naming it getValidating(). </i><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 Unmarshaller is configured to validate during unmarshal operations, false otherwise<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></CODE> - if an error occurs while retrieving the validating flag</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> handler) throws <A HREF="../../../../javax/xml/bind/JAXBException.html" title="class in javax.xml.bind">JAXBException</A></PRE><DL><DD>Allow an application to register a validation event handler. <p> The validation event handler will be called by the JAXB Provider if any validation errors are encountered during calls to any of the <tt>unmarshal</tt> methods. If the client application does not register a validation event handler before invoking the unmarshal methods, then all validation events will be silently ignored and may result in unexpected behaviour.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?