📄 javaio.doc25.html
字号:
<html>
<head>
<title>The Java Language Specification The Package java.io </title>
</head>
<body BGCOLOR=#eeeeff text=#000000 LINK=#0000ff VLINK=#000077 ALINK=#ff0000>
<a href="index.html">Contents</a> | <a href="javaio.doc24.html">Prev</a> | <a href="javaio.doc26.html">Next</a> | <a href="j.index.doc1.html">Index</a>
<hr><br>
<a name="32995"></a>
<center><h1>22.28 The Class <code>java.io.EOFException</code></h1></center>
<a name="32996"></a>
An <code>EOFException</code> is thrown to indicate that an input operation has encountered
end of file. Note that some Java input operations react to end of file by returning a
distinguished value (such as <code>-1</code>) rather than by throwing an exception.
<p><pre><a name="29633"></a>public class <code><b>EOFException</b></code> extends IOException {
<a name="29634"></a> public <code><b>EOFException</b></code>();
<a name="29635"></a> public <code><b>EOFException</b></code>(String s);
<a name="29636"></a>}
</pre><a name="29637"></a>
<p><font size=+1><strong>22.28.1 </strong> <code>public <code><b>EOFException</b></code>()</code></font>
<p>
<a name="29638"></a>
This constructor initializes a newly created <code>EOFException</code> with <code>null</code> as its error
message string.
<p><a name="29639"></a>
<p><font size=+1><strong>22.28.2 </strong> <code>public <code><b>EOFException</b></code>(String s)</code></font>
<p>
<a name="29640"></a>
This constructor initializes a newly created <code>EOFException</code> by saving a reference
to the error message string <code>s</code> for later retrieval by the <code>getMessage</code> method
<a href="javalang.doc20.html#3275">(§20.22.3)</a>.
<p>
<hr>
<!-- This inserts footnotes--><p>
<a href="index.html">Contents</a> | <a href="javaio.doc24.html">Prev</a> | <a href="javaio.doc26.html">Next</a> | <a href="j.index.doc1.html">Index</a>
<p>
<font size=-1>Java Language Specification (HTML generated by Suzette Pelouch on February 24, 1998)<br>
<i><a href="jcopyright.doc.html">Copyright © 1996 Sun Microsystems, Inc.</a>
All rights reserved</i>
<br>
Please send any comments or corrections to <a href="mailto:doug.kramer@sun.com">doug.kramer@sun.com</a>
</font>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -