KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gnu > lists > EofClass


1 // Copyright (c) 2001, 2003 Per M.A. Bothner and Brainfood Inc.
2
// This is free software; for terms and warranty disclaimer see ./COPYING.
3

4 package gnu.lists;
5 import java.io.*;
6
7 public class EofClass implements Externalizable
8 {
9   /** Special magic end-of-file marker. */
10   public static final Object JavaDoc eofValue = new EofClass();
11
12   public final String JavaDoc toString()
13   {
14     return "#!eof";
15   }
16
17   public void writeExternal(ObjectOutput out) throws IOException
18   {
19   }
20
21   public void readExternal(ObjectInput in)
22     throws IOException, ClassNotFoundException JavaDoc
23   {
24   }
25
26   public Object JavaDoc readResolve() throws ObjectStreamException
27   {
28     return Sequence.eofValue;
29   }
30 }
31
Popular Tags