正在加载图片...
StringList with a reasonable custom serialized form oublic final class StringList implements Serializable i private transient int size =0; private transient entry head = null; // No longer Serializable private static class Entry String data: Entry next: Entry previous; / Appends the specified string to the list public final void add (String s)[... y t Serialize this [acode StringList instance s @serialData The size of the list (the number of strings it contains)is emitted (recode int]), fol lowed by all of t its elements (each a [@code String), in the proper 章 sequence private void writeobject (objectoutput Stream s) throws IOException s. defaultwriteobjecto s. writeInt(size): // Write out all elements in the proper order for (Entry e= head; e !=null; e=enext s writeobject(e data) 30 Institute of Computer Software 2021/1/28 Nanjing University2021/1/28 Institute of Computer Software Nanjing University 30
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有