📄 externalizableutil.html
字号:
</DL><HR><A NAME="readExternalizableCollection(java.io.DataInput, java.util.Collection, java.lang.ClassLoader)"><!-- --></A><H3>readExternalizableCollection</H3><PRE>public int <B>readExternalizableCollection</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataInput.html" title="class or interface in java.io">DataInput</A> in, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A><? extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Externalizable.html" title="class or interface in java.io">Externalizable</A>> value, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A> loader) 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>Reads a collection of Externalizable objects and adds them to the collection passed as a parameter. The collection passed as a parameter must be a collection and not a <tt>null</null> value.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the input stream.<DD><CODE>value</CODE> - the collection of Externalizable objects. This value must not be null.<DD><CODE>loader</CODE> - class loader to use to build elements inside of the serialized collection.<DT><B>Returns:</B><DD>the number of elements added to the collection.<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.</DL></DD></DL><HR><A NAME="writeExternalizableMap(java.io.DataOutput, java.util.Map)"><!-- --></A><H3>writeExternalizableMap</H3><PRE>public void <B>writeExternalizableMap</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataOutput.html" title="class or interface in java.io">DataOutput</A> out, <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><<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>,? extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Externalizable.html" title="class or interface in java.io">Externalizable</A>> map) 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>Writes a Map of String key and value pairs. This method handles the case when the Map is <tt>null</tt>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - the output stream.<DD><CODE>map</CODE> - the Map of String key and Externalizable value pairs.<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.</DL></DD></DL><HR><A NAME="readExternalizableMap(java.io.DataInput, java.util.Map, java.lang.ClassLoader)"><!-- --></A><H3>readExternalizableMap</H3><PRE>public int <B>readExternalizableMap</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataInput.html" title="class or interface in java.io">DataInput</A> in, <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><<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>,? extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Externalizable.html" title="class or interface in java.io">Externalizable</A>> map, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A> loader) 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>Reads a Map of String key and value pairs. This method will return <tt>null</tt> if the Map written to the stream was <tt>null</tt>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the input stream.<DD><CODE>map</CODE> - a Map of String key and Externalizable value pairs.<DD><CODE>loader</CODE> - class loader to use to build elements inside of the serialized collection.<DT><B>Returns:</B><DD>the number of elements added to the collection.<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.</DL></DD></DL><HR><A NAME="writeStringsMap(java.io.DataOutput, java.util.Map)"><!-- --></A><H3>writeStringsMap</H3><PRE>public void <B>writeStringsMap</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataOutput.html" title="class or interface in java.io">DataOutput</A> out, <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><<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/util/Set.html" title="class or interface in java.util">Set</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>>> map) 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>Writes a Map of String key and Set of Strings value pairs. This method DOES NOT handle the case when the Map is <tt>null</tt>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - the output stream.<DD><CODE>map</CODE> - the Map of String key and Set of Strings value pairs.<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.</DL></DD></DL><HR><A NAME="readStringsMap(java.io.DataInput, java.util.Map)"><!-- --></A><H3>readStringsMap</H3><PRE>public int <B>readStringsMap</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataInput.html" title="class or interface in java.io">DataInput</A> in, <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><<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/util/Set.html" title="class or interface in java.util">Set</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>>> map) 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>Reads a Map of String key and Set of Strings value pairs.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the input stream.<DD><CODE>map</CODE> - a Map of String key and Set of Strings value pairs.<DT><B>Returns:</B><DD>number of elements added to the collection.<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.</DL></DD></DL><HR><A NAME="writeStrings(java.io.DataOutput, java.util.Collection)"><!-- --></A><H3>writeStrings</H3><PRE>public void <B>writeStrings</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataOutput.html" title="class or interface in java.io">DataOutput</A> out, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</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>> collection) 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>Writes content of collection of strings to the output stream.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - the output stream.<DD><CODE>collection</CODE> - the Collection of Strings.<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.</DL></DD></DL><HR><A NAME="readStrings(java.io.DataInput, java.util.Collection)"><!-- --></A><H3>readStrings</H3><PRE>public int <B>readStrings</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataInput.html" title="class or interface in java.io">DataInput</A> in, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</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>> collection) 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>Reads the string array from the input stream and adds them to the specified collection.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the input stream.<DD><CODE>collection</CODE> - the collection to add the read strings from the input stream.<DT><B>Returns:</B><DD>number of elements added to the collection.<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.</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><b>Openfire 3.6.0a Javadoc</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/jivesoftware/util/cache/DummyExternalizableUtil.html" title="class in org.jivesoftware.util.cache"><B>PREV CLASS</B></A> <A HREF="../../../../org/jivesoftware/util/cache/ExternalizableUtilStrategy.html" title="interface in org.jivesoftware.util.cache"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/jivesoftware/util/cache/ExternalizableUtil.html" target="_top"><B>FRAMES</B></A> <A HREF="ExternalizableUtil.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><i>Copyright © 2003-2008 Jive Software.</i></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -