01: /*
02: *
03: *
04: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26:
27: package java.io;
28:
29: /**
30: * Signals that an end of file or end of stream has been reached
31: * unexpectedly during input.
32: * <p>
33: * This exception is mainly used by data input streams, which
34: * generally expect a binary file in a specific format, and for which
35: * an end of stream is an unusual condition. Most other input streams
36: * return a special value on end of stream.
37: * <p>
38: * Note that some input operations react to end-of-file by returning
39: * a distinguished value (such as <code>-1</code>) rather than by
40: * throwing an exception.
41: *
42: * @version 12/17/01 (CLDC 1.1)
43: * @see java.io.DataInputStream
44: * @see java.io.IOException
45: * @since JDK1.0, CLDC 1.0
46: */
47: public class EOFException extends IOException {
48: /**
49: * Constructs an <code>EOFException</code> with <code>null</code>
50: * as its error detail message.
51: */
52: public EOFException() {
53: super ();
54: }
55:
56: /**
57: * Constructs an <code>EOFException</code> with the specified detail
58: * message. The string <code>s</code> may later be retrieved by the
59: * <code>{@link java.lang.Throwable#getMessage}</code> method of class
60: * <code>java.lang.Throwable</code>.
61: *
62: * @param s the detail message.
63: */
64: public EOFException(String s) {
65: super(s);
66: }
67: }
|