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