FileInputStream.java (FileInputStream(File)), java/io/FileOutputStream.java (FileOutputStream(File)): Removed unnecessary File.isDirectory() check.
2005-04-23 Jeroen Frijters <jeroen@frijters.net> * java/io/FileInputStream.java (FileInputStream(File)), java/io/FileOutputStream.java (FileOutputStream(File)): Removed unnecessary File.isDirectory() check. From-SVN: r98607
This commit is contained in:
parent
3876ed1631
commit
528e5d8bce
3 changed files with 7 additions and 7 deletions
|
@ -105,9 +105,6 @@ public class FileInputStream extends InputStream
|
|||
if (s != null)
|
||||
s.checkRead(file.getPath());
|
||||
|
||||
if (file.isDirectory())
|
||||
throw new FileNotFoundException(file.getPath() + " is a directory");
|
||||
|
||||
ch = new FileChannelImpl (file.getPath(), FileChannelImpl.READ);
|
||||
}
|
||||
|
||||
|
|
|
@ -155,10 +155,7 @@ public class FileOutputStream extends OutputStream
|
|||
if (s != null)
|
||||
s.checkWrite(file.getPath());
|
||||
|
||||
if (file.isDirectory())
|
||||
throw new FileNotFoundException(file.getPath() + " is a directory");
|
||||
|
||||
ch = new FileChannelImpl (file.getPath(), (append
|
||||
ch = new FileChannelImpl (file.getPath(), (append
|
||||
? FileChannelImpl.WRITE
|
||||
| FileChannelImpl.APPEND
|
||||
: FileChannelImpl.WRITE));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue