public class FileNotFoundException
extends IOException
| java.lang.Object | ||||
| java.lang.Throwable | ||||
| java.lang.Exception | ||||
| java.io.IOException | ||||
| java.io.FileNotFoundException | ||||
表示尝试打开由指定路径名表示的文件失败。
此异常将被抛出FileInputStream , FileOutputStream ,并RandomAccessFile构造函数用指定的路径名的文件不存在。 如果文件存在但由于某种原因无法访问,例如当试图打开只读文件进行写入时,也会由这些构造函数抛出。
Public constructors |
|
|---|---|
FileNotFoundException() 用 |
|
FileNotFoundException(String s) 用指定的详细信息构造一个 |
|
继承方法(Inherited methods) |
|
|---|---|
java.lang.Throwable
|
|
java.lang.Object
|
|
FileNotFoundException ()
构造一个 FileNotFoundException其中包含 null作为错误详细信息。
FileNotFoundException (String s)
用指定的详细信息构造一个FileNotFoundException 。 字符串s可以在类的getMessage()方法中getMessage()java.lang.Throwable 。
| 参数(Parameters) | |
|---|---|
s |
String: the detail message. |