1. /*
  2. * @(#)EOFException.java 1.8 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.io;
  8. /**
  9. * Signals that an end of file or end of stream has been reached
  10. * unexpectedly during input.
  11. * <p>
  12. * This exception is mainly used by data input streams, which
  13. * generally expect a binary file in a specific format, and for which
  14. * an end of stream is an unusual condition. Most other input streams
  15. * return a special value on end of stream.
  16. * <p>
  17. * Note that some input operations react to end-of-file by returning
  18. * a distinguished value (such as <code>-1</code>) rather than by
  19. * throwing an exception.
  20. *
  21. * @author Frank Yellin
  22. * @version 1.8, 11/29/01
  23. * @see java.io.DataInputStream
  24. * @see java.io.IOException
  25. * @since JDK1.0
  26. */
  27. public
  28. class EOFException extends IOException {
  29. /**
  30. * Constructs an <code>EOFException</code> with <code>null</code>
  31. * as its error detail message.
  32. */
  33. public EOFException() {
  34. super();
  35. }
  36. /**
  37. * Constructs an <code>EOFException</code> with the specified detail
  38. * message. The string <code>s</code> may later be retrieved by the
  39. * <code>{@link java.lang.Throwable#getMessage}</code> method of class
  40. * <code>java.lang.Throwable</code>.
  41. *
  42. * @param s the detail message.
  43. */
  44. public EOFException(String s) {
  45. super(s);
  46. }
  47. }