delete
public boolean delete()Deletes the file or directory denoted by this abstract pathname. If this pathname denotes a directory, then the directory must be empty in order to be deleted. Returns:
true if and only if the file or directory is successfully deleted; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkDelete(java.lang.String) method denies delete access to the filejdk文档中的说明.
public boolean delete()Deletes the file or directory denoted by this abstract pathname. If this pathname denotes a directory, then the directory must be empty in order to be deleted. Returns:
true if and only if the file or directory is successfully deleted; false otherwise
Throws:
SecurityException - If a security manager exists and its SecurityManager.checkDelete(java.lang.String) method denies delete access to the filejdk文档中的说明.
解决方案 »
- 有关内存数据库以及大数据量操作的问题
- log4j 不能级别日志 输出到不同文件 (或是Logger组件的问题)
- 请问一下j2ee1.3的类是放在哪个文件夹下.....
- 如何使用uddi4j,在jUDDI中查询和调用web服务?
- JTable中怎样彻底删除一列?求教?
- 求几个国外的Java学习网站
- 不会java,能否感受WebLogic,WebSphere等“中间件”?
- 这是什么错误?ava.lang.ArrayIndexOutOfBoundsException: 0 >= 0
- 外层类和内部类 ,关于序列化的一些理解是否正确?
- SpringMVC mybatis注入Dao层失败
- 如何使用CMP管理Oracle的LONG RAW字段?
- 请教一段xml头的含义
File upFile = getUpLoadFile("UploadFile"); //写输入文件
byte fileByte[] = new byte[Integer.parseInt(Long.toString(upFile.length()))];
try { FileInputStream ddd = new FileInputStream(upFile); ddd.read(fileByte);
ddd.close(); FileOutputStream outf = new FileOutputStream(new File(outFilename));
outf.write(fileByte);
outf.close();
upFile.delete();