xmleventallocator.html
来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 286 行
HTML
286 行
<!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.5.0_14) on Mon Jan 28 05:47:01 PST 2008 --><TITLE>XMLEventAllocator (Java EE 5)</TITLE><META NAME="keywords" CONTENT="javax.xml.stream.util.XMLEventAllocator interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="XMLEventAllocator (Java EE 5)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= 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/stream/util/StreamReaderDelegate.html" title="class in javax.xml.stream.util"><B>PREV CLASS</B></A> <A HREF="../../../../javax/xml/stream/util/XMLEventConsumer.html" title="interface in javax.xml.stream.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?javax/xml/stream/util/XMLEventAllocator.html" target="_top"><B>FRAMES</B></A> <A HREF="XMLEventAllocator.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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.stream.util</FONT><BR>Interface XMLEventAllocator</H2><HR><DL><DT><PRE>public interface <B>XMLEventAllocator</B></DL></PRE><P>This interface defines a class that allows a user to register a way to allocate events given an XMLStreamReader. An implementation is not required to use the XMLEventFactory implementation but this is recommended. The XMLEventAllocator can be set on an XMLInputFactory using the property "javax.xml.stream.allocator"<P><P><DL><DT><B>Version:</B></DT> <DD>1.0</DD><DT><B>Author:</B></DT> <DD>Copyright (c) 2003 by BEA Systems. All Rights Reserved.</DD><DT><B>See Also:</B><DD><A HREF="../../../../javax/xml/stream/XMLInputFactory.html" title="class in javax.xml.stream"><CODE>XMLInputFactory</CODE></A>, <A HREF="../../../../javax/xml/stream/XMLEventFactory.html" title="class in javax.xml.stream"><CODE>XMLEventFactory</CODE></A></DL><HR><P><!-- ========== 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> <A HREF="../../../../javax/xml/stream/events/XMLEvent.html" title="interface in javax.xml.stream.events">XMLEvent</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/stream/util/XMLEventAllocator.html#allocate(javax.xml.stream.XMLStreamReader)">allocate</A></B>(<A HREF="../../../../javax/xml/stream/XMLStreamReader.html" title="interface in javax.xml.stream">XMLStreamReader</A> reader)</CODE><BR> This method allocates an event given the current state of the XMLStreamReader.</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/stream/util/XMLEventAllocator.html#allocate(javax.xml.stream.XMLStreamReader, javax.xml.stream.util.XMLEventConsumer)">allocate</A></B>(<A HREF="../../../../javax/xml/stream/XMLStreamReader.html" title="interface in javax.xml.stream">XMLStreamReader</A> reader, <A HREF="../../../../javax/xml/stream/util/XMLEventConsumer.html" title="interface in javax.xml.stream.util">XMLEventConsumer</A> consumer)</CODE><BR> This method allocates an event or set of events given the current state of the XMLStreamReader and adds the event or set of events to the consumer that was passed in.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../javax/xml/stream/util/XMLEventAllocator.html" title="interface in javax.xml.stream.util">XMLEventAllocator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/xml/stream/util/XMLEventAllocator.html#newInstance()">newInstance</A></B>()</CODE><BR> This method creates an instance of the XMLEventAllocator.</TD></TR></TABLE> <P><!-- ============ 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="newInstance()"><!-- --></A><H3>newInstance</H3><PRE><A HREF="../../../../javax/xml/stream/util/XMLEventAllocator.html" title="interface in javax.xml.stream.util">XMLEventAllocator</A> <B>newInstance</B>()</PRE><DL><DD>This method creates an instance of the XMLEventAllocator. This allows the XMLInputFactory to allocate a new instance per reader.<P><DD><DL></DL></DD></DL><HR><A NAME="allocate(javax.xml.stream.XMLStreamReader)"><!-- --></A><H3>allocate</H3><PRE><A HREF="../../../../javax/xml/stream/events/XMLEvent.html" title="interface in javax.xml.stream.events">XMLEvent</A> <B>allocate</B>(<A HREF="../../../../javax/xml/stream/XMLStreamReader.html" title="interface in javax.xml.stream">XMLStreamReader</A> reader) throws <A HREF="../../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></PRE><DL><DD>This method allocates an event given the current state of the XMLStreamReader. If this XMLEventAllocator does not have a one-to-one mapping between reader states and events this method will return null. This method must not modify the state of the XMLStreamReader.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - The XMLStreamReader to allocate from<DT><B>Returns:</B><DD>the event corresponding to the current reader state<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></CODE></DL></DD></DL><HR><A NAME="allocate(javax.xml.stream.XMLStreamReader, javax.xml.stream.util.XMLEventConsumer)"><!-- --></A><H3>allocate</H3><PRE>void <B>allocate</B>(<A HREF="../../../../javax/xml/stream/XMLStreamReader.html" title="interface in javax.xml.stream">XMLStreamReader</A> reader, <A HREF="../../../../javax/xml/stream/util/XMLEventConsumer.html" title="interface in javax.xml.stream.util">XMLEventConsumer</A> consumer) throws <A HREF="../../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></PRE><DL><DD>This method allocates an event or set of events given the current state of the XMLStreamReader and adds the event or set of events to the consumer that was passed in. This method can be used to expand or contract reader states into event states. This method may modify the state of the XMLStreamReader.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - The XMLStreamReader to allocate from<DD><CODE>consumer</CODE> - The XMLEventConsumer to add to.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></CODE></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/stream/util/StreamReaderDelegate.html" title="class in javax.xml.stream.util"><B>PREV CLASS</B></A> <A HREF="../../../../javax/xml/stream/util/XMLEventConsumer.html" title="interface in javax.xml.stream.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?javax/xml/stream/util/XMLEventAllocator.html" target="_top"><B>FRAMES</B></A> <A HREF="XMLEventAllocator.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?