⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 packet.html

📁 开源项目smack的API文件
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<PRE>public void <B>setError</B>(<A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html" title="class in org.jivesoftware.smack.packet">XMPPError</A>&nbsp;error)</PRE><DL><DD>Sets the error for this packet.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>error</CODE> - the error to associate with this packet.</DL></DD></DL><HR><A NAME="getExtensions()"><!-- --></A><H3>getExtensions</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&lt;<A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A>&gt; <B>getExtensions</B>()</PRE><DL><DD>Returns an unmodifiable collection of the packet extensions attached to the packet.<P><DD><DL><DT><B>Returns:</B><DD>the packet extensions.</DL></DD></DL><HR><A NAME="getExtension(java.lang.String)"><!-- --></A><H3>getExtension</H3><PRE>public <A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A> <B>getExtension</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;namespace)</PRE><DL><DD>Returns the first extension of this packet that has the given namespace.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>namespace</CODE> - the namespace of the extension that is desired.<DT><B>Returns:</B><DD>the packet extension with the given namespace.</DL></DD></DL><HR><A NAME="getExtension(java.lang.String, java.lang.String)"><!-- --></A><H3>getExtension</H3><PRE>public <A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A> <B>getExtension</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;elementName,                                    <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;namespace)</PRE><DL><DD>Returns the first packet extension that matches the specified element name and namespace, or <tt>null</tt> if it doesn't exist. If the provided elementName is null than only the provided namespace is attempted to be matched. Packet extensions are are arbitrary XML sub-documents in standard XMPP packets. By default, a  DefaultPacketExtension instance will be returned for each extension. However,  PacketExtensionProvider instances can be registered with the  <A HREF="../../../../org/jivesoftware/smack/provider/ProviderManager.html" title="class in org.jivesoftware.smack.provider"><CODE>ProviderManager</CODE></A> class to handle custom parsing. In that case, the type of the Object will be determined by the provider.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>elementName</CODE> - the XML element name of the packet extension. (May be null)<DD><CODE>namespace</CODE> - the XML element namespace of the packet extension.<DT><B>Returns:</B><DD>the extension, or <tt>null</tt> if it doesn't exist.</DL></DD></DL><HR><A NAME="addExtension(org.jivesoftware.smack.packet.PacketExtension)"><!-- --></A><H3>addExtension</H3><PRE>public void <B>addExtension</B>(<A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A>&nbsp;extension)</PRE><DL><DD>Adds a packet extension to the packet.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>extension</CODE> - a packet extension.</DL></DD></DL><HR><A NAME="removeExtension(org.jivesoftware.smack.packet.PacketExtension)"><!-- --></A><H3>removeExtension</H3><PRE>public void <B>removeExtension</B>(<A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A>&nbsp;extension)</PRE><DL><DD>Removes a packet extension from the packet.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>extension</CODE> - the packet extension to remove.</DL></DD></DL><HR><A NAME="getProperty(java.lang.String)"><!-- --></A><H3>getProperty</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getProperty</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD>Returns the packet property with the specified name or <tt>null</tt> if the property doesn't exist. Property values that were orginally primitives will be returned as their object equivalent. For example, an int property will be returned as an Integer, a double as a Double, etc.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property.<DT><B>Returns:</B><DD>the property, or <tt>null</tt> if the property doesn't exist.</DL></DD></DL><HR><A NAME="setProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3>setProperty</H3><PRE>public void <B>setProperty</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name,                        <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;value)</PRE><DL><DD>Sets a property with an Object as the value. The value must be Serializable or an IllegalArgumentException will be thrown.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property.<DD><CODE>value</CODE> - the value of the property.</DL></DD></DL><HR><A NAME="deleteProperty(java.lang.String)"><!-- --></A><H3>deleteProperty</H3><PRE>public void <B>deleteProperty</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD>Deletes a property.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property to delete.</DL></DD></DL><HR><A NAME="getPropertyNames()"><!-- --></A><H3>getPropertyNames</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&lt;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&gt; <B>getPropertyNames</B>()</PRE><DL><DD>Returns an unmodifiable collection of all the property names that are set.<P><DD><DL><DT><B>Returns:</B><DD>all property names.</DL></DD></DL><HR><A NAME="toXML()"><!-- --></A><H3>toXML</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toXML</B>()</PRE><DL><DD>Returns the packet as XML. Every concrete extension of Packet must implement this method. In addition to writing out packet-specific data, every sub-class should also write out the error and the extensions data if they are defined.<P><DD><DL><DT><B>Returns:</B><DD>the XML format of the packet as a String.</DL></DD></DL><HR><A NAME="getExtensionsXML()"><!-- --></A><H3>getExtensionsXML</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getExtensionsXML</B>()</PRE><DL><DD>Returns the extension sub-packets (including properties data) as an XML String, or the Empty String if there are no packet extensions.<P><DD><DL><DT><B>Returns:</B><DD>the extension sub-packets as XML or the Empty String if there are no packet extensions.</DL></DD></DL><HR><A NAME="getXmlns()"><!-- --></A><H3>getXmlns</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getXmlns</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="parseXMLLang(java.lang.String)"><!-- --></A><H3>parseXMLLang</H3><PRE>protected static <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>parseXMLLang</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;language)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="getDefaultLanguage()"><!-- --></A><H3>getDefaultLanguage</H3><PRE>protected static <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getDefaultLanguage</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;o)</PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></DL></DD><DD><DL></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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Smack</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/jivesoftware/smack/packet/Message.Type.html" title="enum in org.jivesoftware.smack.packet"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?org/jivesoftware/smack/packet/Packet.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Packet.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright &copy; 2003-2007 Jive Software. </i></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -