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