Most visited

Recently visited

Added in API level 1

FileNotFoundException

public class FileNotFoundException
extends IOException

java.lang.Object
    java.lang.Throwable
      java.lang.Exception
        java.io.IOException
          java.io.FileNotFoundException


表示尝试打开由指定路径名表示的文件失败。

此异常将被抛出FileInputStreamFileOutputStream ,并RandomAccessFile构造函数用指定的路径名的文件不存在。 如果文件存在但由于某种原因无法访问,例如当试图打开只读文件进行写入时,也会由这些构造函数抛出。

摘要(Summary)

Public constructors

FileNotFoundException()

null作为其错误详细信息构造一个 FileNotFoundException

FileNotFoundException(String s)

用指定的详细信息构造一个 FileNotFoundException

继承方法(Inherited methods)

From class java.lang.Throwable
From class java.lang.Object

Public constructors

FileNotFoundException

Added in API level 1
FileNotFoundException ()

构造一个 FileNotFoundException其中包含 null作为错误详细信息。

FileNotFoundException

Added in API level 1
FileNotFoundException (String s)

用指定的详细信息构造一个FileNotFoundException 字符串s可以在getMessage()类的getMessage()方法中java.lang.Throwable

参数(Parameters)
s String: the detail message.

Hooray!