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

📄 serialization.html

📁 文件来自swarm.org
💻 HTML
📖 第 1 页 / 共 2 页
字号:
                                   java.lang.String&nbsp;aName,                                   short&nbsp;val)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;On the given stream, save an unsigned short integer variable called "aName" which has value "val".</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/defobj/Serialization.html#updateArchiver(swarm.defobj.Archiver)">updateArchiver</A></B>(<A HREF="../../swarm/defobj/Archiver.html">Archiver</A>&nbsp;archiver)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="lispOutShallow(java.lang.Object)"><!-- --></A><H3>lispOutShallow</H3><PRE>public void <B>lispOutShallow</B>(java.lang.Object&nbsp;stream)</PRE><DL><DD>Output a shallow Lisp representation of object state to a stream.</DL><HR><A NAME="lispOutDeep(java.lang.Object)"><!-- --></A><H3>lispOutDeep</H3><PRE>public void <B>lispOutDeep</B>(java.lang.Object&nbsp;stream)</PRE><DL><DD>Output a deep Lisp representation of object state to a stream.</DL><HR><A NAME="lispOutVars$deep(java.lang.Object, boolean)"><!-- --></A><H3>lispOutVars$deep</H3><PRE>public void <B>lispOutVars$deep</B>(java.lang.Object&nbsp;stream,                             boolean&nbsp;deepFlag)</PRE><DL><DD>Output just key/variable pairs, where variables are serialized  deep or shallow per deepFlag.</DL><HR><A NAME="lispSaveStream$Boolean$Value(java.lang.Object, java.lang.String, int)"><!-- --></A><H3>lispSaveStream$Boolean$Value</H3><PRE>public void <B>lispSaveStream$Boolean$Value</B>(java.lang.Object&nbsp;stream,                                         java.lang.String&nbsp;aName,                                         int&nbsp;val)</PRE><DL><DD>On the given stream, save a Boolean variable called "aName"  which has value "val". Explanation:  The Swarm lisp serialization approach assumes that objects have lispOutDeep: and lispOutShallow: methods which indicate which variables are supposed to be saved.  If an object is  subclassed from SwarmObject, there are default lispOutDeep:  and lispOutShallow: methods. Those methods employ on the method, lispOutVars:deep:, which is the "default" approach to try to save all variables, either deep or shallow.  Sometimes one needs to selectively list particular instance variables to be saved. This is necessary, for example, if one wants to save a Swarm itself, because the usage of lispOutVars: will result in  a variable "activity" being saved as nil, and so when the saved values are read back in, the "activity" variable will be erased and nil will appear in its place.   Here is an example of how a subclass called "BFagent"  might override lispOutDeep: to customize  the selection of variables to be saved.  Note that the same could be used to override lispOutShallow:.  The key thing to remember is that when one tries to do a deep save on a high level object, such as a Swarm, then the Swarm libraries will try to track from top to bottom, finding all collections and objects, and all objects and collections inside them, and so forth, and each will be told to execute its lispOutDeep: method.  So all objects you want to save need a lispOutDeep: method, or else the default will try to save all variables.  If you omit some objects or variables from your lispOutDeep: method, then they will not appear in the saved file, which is what you want if you want to be sure that pre-existing interited values of variables are not obliterated  by bogus saved values.</DL><HR><A NAME="lispSaveStream$Char$Value(java.lang.Object, java.lang.String, char)"><!-- --></A><H3>lispSaveStream$Char$Value</H3><PRE>public void <B>lispSaveStream$Char$Value</B>(java.lang.Object&nbsp;stream,                                      java.lang.String&nbsp;aName,                                      char&nbsp;val)</PRE><DL><DD>On the given stream, save a character variable called "aName" which has value "val".</DL><HR><A NAME="lispSaveStream$Short$Value(java.lang.Object, java.lang.String, short)"><!-- --></A><H3>lispSaveStream$Short$Value</H3><PRE>public void <B>lispSaveStream$Short$Value</B>(java.lang.Object&nbsp;stream,                                       java.lang.String&nbsp;aName,                                       short&nbsp;val)</PRE><DL><DD>On the given stream, save a short integer variable called "aName" which has value "val".</DL><HR><A NAME="lispSaveStream$UnsignedShort$Value(java.lang.Object, java.lang.String, short)"><!-- --></A><H3>lispSaveStream$UnsignedShort$Value</H3><PRE>public void <B>lispSaveStream$UnsignedShort$Value</B>(java.lang.Object&nbsp;stream,                                               java.lang.String&nbsp;aName,                                               short&nbsp;val)</PRE><DL><DD>On the given stream, save an unsigned short integer variable called "aName" which has value "val".</DL><HR><A NAME="lispSaveStream$Integer$Value(java.lang.Object, java.lang.String, int)"><!-- --></A><H3>lispSaveStream$Integer$Value</H3><PRE>public void <B>lispSaveStream$Integer$Value</B>(java.lang.Object&nbsp;stream,                                         java.lang.String&nbsp;aName,                                         int&nbsp;val)</PRE><DL><DD>On the given stream, save an integer variable called "aName" which has value "val".</DL><HR><A NAME="lispSaveStream$Unsigned$Value(java.lang.Object, java.lang.String, int)"><!-- --></A><H3>lispSaveStream$Unsigned$Value</H3><PRE>public void <B>lispSaveStream$Unsigned$Value</B>(java.lang.Object&nbsp;stream,                                          java.lang.String&nbsp;aName,                                          int&nbsp;val)</PRE><DL><DD>On the given stream, save an unsigned integer variable called "aName" which has value "val".</DL><HR><A NAME="lispSaveStream$Long$Value(java.lang.Object, java.lang.String, int)"><!-- --></A><H3>lispSaveStream$Long$Value</H3><PRE>public void <B>lispSaveStream$Long$Value</B>(java.lang.Object&nbsp;stream,                                      java.lang.String&nbsp;aName,                                      int&nbsp;val)</PRE><DL><DD>On the given stream, save a long variables called "aName" which has value "val".</DL><HR><A NAME="lispSaveStream$UnsignedLong$Value(java.lang.Object, java.lang.String, int)"><!-- --></A><H3>lispSaveStream$UnsignedLong$Value</H3><PRE>public void <B>lispSaveStream$UnsignedLong$Value</B>(java.lang.Object&nbsp;stream,                                              java.lang.String&nbsp;aName,                                              int&nbsp;val)</PRE><DL><DD>On the given stream, save an unsigned long variable called "aName" which has value "val".</DL><HR><A NAME="lispSaveStream$LongLong$Value(java.lang.Object, java.lang.String, long)"><!-- --></A><H3>lispSaveStream$LongLong$Value</H3><PRE>public void <B>lispSaveStream$LongLong$Value</B>(java.lang.Object&nbsp;stream,                                          java.lang.String&nbsp;aName,                                          long&nbsp;val)</PRE><DL><DD>On the given stream, save a long long variable called "aName" which has value "val".</DL><HR><A NAME="lispSaveStream$UnsignedLongLong$Value(java.lang.Object, java.lang.String, long)"><!-- --></A><H3>lispSaveStream$UnsignedLongLong$Value</H3><PRE>public void <B>lispSaveStream$UnsignedLongLong$Value</B>(java.lang.Object&nbsp;stream,                                                  java.lang.String&nbsp;aName,                                                  long&nbsp;val)</PRE><DL><DD>On the given stream, save an unsigned long long variable called "aName" which has value "val".</DL><HR><A NAME="lispSaveStream$Float$Value(java.lang.Object, java.lang.String, double)"><!-- --></A><H3>lispSaveStream$Float$Value</H3><PRE>public void <B>lispSaveStream$Float$Value</B>(java.lang.Object&nbsp;stream,                                       java.lang.String&nbsp;aName,                                       double&nbsp;val)</PRE><DL><DD>On the given stream, save a float valued variable called "aName" which has value "val".</DL><HR><A NAME="lispSaveStream$Double$Value(java.lang.Object, java.lang.String, double)"><!-- --></A><H3>lispSaveStream$Double$Value</H3><PRE>public void <B>lispSaveStream$Double$Value</B>(java.lang.Object&nbsp;stream,                                        java.lang.String&nbsp;aName,                                        double&nbsp;val)</PRE><DL><DD>On the given stream, save a double valued variable called "aName" which has value "val".</DL><HR><A NAME="hdf5OutShallow(swarm.defobj.HDF5)"><!-- --></A><H3>hdf5OutShallow</H3><PRE>public void <B>hdf5OutShallow</B>(<A HREF="../../swarm/defobj/HDF5.html">HDF5</A>&nbsp;hdf5obj)</PRE><DL><DD>Output a shallow HDF5 representation of object state to a stream.</DL><HR><A NAME="hdf5OutDeep(swarm.defobj.HDF5)"><!-- --></A><H3>hdf5OutDeep</H3><PRE>public void <B>hdf5OutDeep</B>(<A HREF="../../swarm/defobj/HDF5.html">HDF5</A>&nbsp;hdf5obj)</PRE><DL><DD>Output a deep HDF5 representation of object state to a stream.</DL><HR><A NAME="updateArchiver(swarm.defobj.Archiver)"><!-- --></A><H3>updateArchiver</H3><PRE>public void <B>updateArchiver</B>(<A HREF="../../swarm/defobj/Archiver.html">Archiver</A>&nbsp;archiver)</PRE><DL></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="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 ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../swarm/defobj/LispArchiverS.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../swarm/defobj/SerializationC.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Serialization.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>

⌨️ 快捷键说明

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