File tree Expand file tree Collapse file tree
src/java/org/apache/commons/io Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525import java .io .InputStream ;
2626import java .io .OutputStream ;
2727import java .net .URL ;
28- import java .nio .channels .FileChannel ;
2928import java .util .Collection ;
3029import java .util .Date ;
3130import java .util .Iterator ;
@@ -119,7 +118,7 @@ public FileUtils() {
119118 * An exception is thrown if the file exists but cannot be read.
120119 *
121120 * @param file the file to open for input, not null
122- * @throws IOException if the file does not exist
121+ * @throws FileNotFoundException if the file does not exist
123122 * @throws IOException if the file object is a directory
124123 * @throws IOException if the file cannot be read
125124 * @since Commons IO 1.3
@@ -133,7 +132,7 @@ public static FileInputStream openInputStream(File file) throws IOException {
133132 throw new IOException ("File '" + file + "' cannot be read" );
134133 }
135134 } else {
136- throw new IOException ("File '" + file + "' does not exist" );
135+ throw new FileNotFoundException ("File '" + file + "' does not exist" );
137136 }
138137 return new FileInputStream (file );
139138 }
You can’t perform that action at this time.
0 commit comments