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

📄 xmlproperties.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</DL><HR><A NAME="XMLProperties(java.io.InputStream)"><!-- --></A><H3>XMLProperties</H3><PRE>public <B>XMLProperties</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;in)              throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Loads XML properties from a stream.<P><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the input stream of XML.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an exception occurs when reading the stream.</DL></DL><HR><A NAME="XMLProperties(java.io.File)"><!-- --></A><H3>XMLProperties</H3><PRE>public <B>XMLProperties</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;file)              throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Creates a new XMLPropertiesTest object.<P><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the file that properties should be read from and written to.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an error occurs loading the properties.</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="getProperty(java.lang.String)"><!-- --></A><H3>getProperty</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getProperty</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD>Returns the value of the specified property.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property to get.<DT><B>Returns:</B><DD>the value of the specified property.</DL></DD></DL><HR><A NAME="getProperties(java.lang.String)"><!-- --></A><H3>getProperties</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getProperties</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD>Return all values who's path matches the given property name as a String array, or an empty array if the if there are no children. This allows you to retrieve several values with the same property name. For example, consider the XML file entry: <pre> &lt;foo&gt;     &lt;bar&gt;         &lt;prop&gt;some value&lt;/prop&gt;         &lt;prop&gt;other value&lt;/prop&gt;         &lt;prop&gt;last value&lt;/prop&gt;     &lt;/bar&gt; &lt;/foo&gt; </pre> If you call getProperties("foo.bar.prop") will return a string array containing {"some value", "other value", "last value"}.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property to retrieve<DT><B>Returns:</B><DD>all child property values for the given node name.</DL></DD></DL><HR><A NAME="getChildProperties(java.lang.String)"><!-- --></A><H3>getChildProperties</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>getChildProperties</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD>Return all values who's path matches the given property name as a String array, or an empty array if the if there are no children. This allows you to retrieve several values with the same property name. For example, consider the XML file entry: <pre> &lt;foo&gt;     &lt;bar&gt;         &lt;prop&gt;some value&lt;/prop&gt;         &lt;prop&gt;other value&lt;/prop&gt;         &lt;prop&gt;last value&lt;/prop&gt;     &lt;/bar&gt; &lt;/foo&gt; </pre> If you call getProperties("foo.bar.prop") will return a string array containing {"some value", "other value", "last value"}.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property to retrieve<DT><B>Returns:</B><DD>all child property values for the given node name.</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String, java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getAttribute</B>(<A HREF="http://java.sun.com/j2se/1.5.0/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.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;attribute)</PRE><DL><DD>Returns the value of the attribute of the given property name or <tt>null</tt> if it doesn't exist. Note, this<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the property name to lookup - ie, "foo.bar"<DD><CODE>attribute</CODE> - the name of the attribute, ie "id"<DT><B>Returns:</B><DD>the value of the attribute of the given property or <tt>null</tt> if      it doesn't exist.</DL></DD></DL><HR><A NAME="setProperties(java.lang.String, java.util.List)"><!-- --></A><H3>setProperties</H3><PRE>public void <B>setProperties</B>(<A HREF="http://java.sun.com/j2se/1.5.0/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.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&gt;&nbsp;values)</PRE><DL><DD>Sets a property to an array of values. Multiple values matching the same property is mapped to an XML file as multiple elements containing each value. For example, using the name "foo.bar.prop", and the value string array containing {"some value", "other value", "last value"} would produce the following XML: <pre> &lt;foo&gt;     &lt;bar&gt;         &lt;prop&gt;some value&lt;/prop&gt;         &lt;prop&gt;other value&lt;/prop&gt;         &lt;prop&gt;last value&lt;/prop&gt;     &lt;/bar&gt; &lt;/foo&gt; </pre><P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property.<DD><CODE>values</CODE> - the values for the property (can be empty but not null).</DL></DD></DL><HR><A NAME="getChildrenProperties(java.lang.String)"><!-- --></A><H3>getChildrenProperties</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getChildrenProperties</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;parent)</PRE><DL><DD>Return all children property names of a parent property as a String array, or an empty array if the if there are no children. For example, given the properties <tt>X.Y.A</tt>, <tt>X.Y.B</tt>, and <tt>X.Y.C</tt>, then the child properties of <tt>X.Y</tt> are <tt>A</tt>, <tt>B</tt>, and <tt>C</tt>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>parent</CODE> - the name of the parent property.<DT><B>Returns:</B><DD>all child property values for the given parent.</DL></DD></DL><HR><A NAME="setProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>setProperty</H3><PRE>public void <B>setProperty</B>(<A HREF="http://java.sun.com/j2se/1.5.0/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.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;value)</PRE><DL><DD>Sets the value of the specified property. If the property doesn't currently exist, it will be automatically created.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the property to set.<DD><CODE>value</CODE> - the new value for 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.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD>Deletes the specified property.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the property to delete.</DL></DD></DL><HR><A NAME="setProperties(java.util.Map)"><!-- --></A><H3>setProperties</H3><PRE>public void <B>setProperties</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&gt;&nbsp;propertyMap)</PRE><DL><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>Openfire 3.6.0a Javadoc</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../org/jivesoftware/util/WebManager.html" title="class in org.jivesoftware.util"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/jivesoftware/util/XMLWriter.html" title="class in org.jivesoftware.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?org/jivesoftware/util/XMLProperties.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="XMLProperties.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;FIELD&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;FIELD&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-2008 Jive Software.</i></BODY></HTML>

⌨️ 快捷键说明

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