public class FileNotFoundException extends IOException
此异常将被抛出FileInputStream
, FileOutputStream
和RandomAccessFile
构造函数用指定的路径名的文件不存在。
如果文件确实存在但由于某种原因存在,这些构造函数也将被抛出,例如当尝试打开只读文件进行写入时。
Constructor and Description |
---|
FileNotFoundException()
构造一个
FileNotFoundException 与
null 作为其错误详细消息。
|
FileNotFoundException(String s)
构造具有
FileNotFoundException 详细消息的FileNotFoundException。
|
addSuppressed,
fillInStackTrace, getCause, getLocalizedMessage,
getMessage, getStackTrace, getSuppressed, initCause,
printStackTrace, printStackTrace,
printStackTrace,
setStackTrace,
toString
public FileNotFoundException()
FileNotFoundException
与
null
作为其错误详细消息。
public FileNotFoundException(String s)
FileNotFoundException
详细消息的FileNotFoundException。
字符串s
可以稍后通过Throwable.getMessage()
类的Throwable.getMessage()
方法java.lang.Throwable
。
s
- 详细信息。