EofClass.java 666 B

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