【发布时间】:2017-03-19 13:30:51
【问题描述】:
我有一个ArrayList<File>。
我需要将这些文件写入我的计算机中的 output_Directory
这是我的代码
for (File file : corpus)
{
try {
FileWriter fw = new FileWriter (new File(outDirName, file.getName()));
BufferedWriter bw = new BufferedWriter (fw);
PrintWriter out = new PrintWriter (bw);
out.close();
}
catch (Exception e){
System.out.println(e.toString());
}
}
语料库是文件的数组列表
错误是
java.io.FileNotFoundException: Diroutput/name of my file
(没有这种类型的文件或目录)
【问题讨论】:
-
您从异常的名称、消息和 javadoc 中推断出什么?