Author: scolebourne
Date: Fri Dec 29 05:15:33 2006
New Revision: 491001

URL: http://svn.apache.org/viewvc?view=rev&rev=491001
Log:
IO-107 - Add FileUtils.openInputStream, with better error messages than the JDK

Modified:
    
jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java

Modified: 
jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java?view=diff&rev=491001&r1=491000&r2=491001
==============================================================================
--- 
jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java 
(original)
+++ 
jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java 
Fri Dec 29 05:15:33 2006
@@ -25,7 +25,6 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.URL;
-import java.nio.channels.FileChannel;
 import java.util.Collection;
 import java.util.Date;
 import java.util.Iterator;
@@ -119,7 +118,7 @@
      * An exception is thrown if the file exists but cannot be read.
      * 
      * @param file  the file to open for input, not null
-     * @throws IOException if the file does not exist
+     * @throws FileNotFoundException if the file does not exist
      * @throws IOException if the file object is a directory
      * @throws IOException if the file cannot be read
      * @since Commons IO 1.3
@@ -133,7 +132,7 @@
                 throw new IOException("File '" + file + "' cannot be read");
             }
         } else {
-            throw new IOException("File '" + file + "' does not exist");
+            throw new FileNotFoundException("File '" + file + "' does not 
exist");
         }
         return new FileInputStream(file);
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to