美图齐众专注资阳网站设计 资阳网站制作 资阳网站建设
资阳网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

创新互联鸿蒙OS教程:鸿蒙OSFileNotFoundException

FileNotFoundException

java.lang.Object

|---java.lang.Throwable

|---|---java.lang.Exception

|---|---|---java.io.IOException

|---|---|---|---java.io.FileNotFoundException

public class FileNotFoundException
extends IOException

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

当具有指定路径名的文件不存在时,FileInputStream、FileOutputStream 和 RandomAccessFile 构造函数将引发此异常。 如果文件确实存在但由于某种原因不可访问,例如当试图打开只读文件进行写入时,这些构造函数也会抛出它。

Since:

JDK1.0

构造函数摘要

构造函数 描述
FileNotFoundException() 构造一个以 null 作为其错误详细消息的 FileNotFoundException。
FileNotFoundException(String s) 使用指定的详细消息构造 FileNotFoundException。

方法总结

从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从类 java.lang.Throwable 继承的方法
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

构造函数详细信息

FileNotFoundException

public FileNotFoundException()

构造一个以 null 作为其错误详细消息的 FileNotFoundException。

FileNotFoundException

public FileNotFoundException(String s)

使用指定的详细消息构造 FileNotFoundException。 字符串 s 可以稍后通过 java.lang.Throwable 类的 Throwable.getMessage() 方法检索。

参数:

参数名称 参数描述
s 详细信息。

文章题目:创新互联鸿蒙OS教程:鸿蒙OSFileNotFoundException
网页路径:http://zsjierui.cn/article/cccjhge.html

其他资讯