01: // Copyright (c) 2001, 2003 Per M.A. Bothner and Brainfood Inc.
02: // This is free software; for terms and warranty disclaimer see ./COPYING.
03:
04: package gnu.lists;
05:
06: import java.io.*;
07:
08: public class EofClass implements Externalizable {
09: /** Special magic end-of-file marker. */
10: public static final Object eofValue = new EofClass();
11:
12: public final String toString() {
13: return "#!eof";
14: }
15:
16: public void writeExternal(ObjectOutput out) throws IOException {
17: }
18:
19: public void readExternal(ObjectInput in) throws IOException,
20: ClassNotFoundException {
21: }
22:
23: public Object readResolve() throws ObjectStreamException {
24: return Sequence.eofValue;
25: }
26: }
|