diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-29 18:47:42 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-29 18:47:42 +0000 |
commit | a809cb64cf76259d2d0b87e14332a227c34da5ea (patch) | |
tree | a633006bbff08f9d9c68b140ddd9e2656e06ec70 /libjava/java/io/FileInputStream.java | |
parent | f53ce661177e4d4d44f53bd236857c26e5de43a3 (diff) | |
download | gcc-a809cb64cf76259d2d0b87e14332a227c34da5ea.tar.gz |
2005-04-29 Dalibor Topic <robilad@kaffe.org>
* java/nio/channels/FileChannelImpl.java
(FileChannelImpl(String, int)): Removed.
(FileChannelImpl(File, int)): Added. Check if opened file is a
directory.
* java/io/FileInputStream.java(FileInputStream): Fixed javadocs.
Call FileChannelImpl(File, int).
* java/io/FileOutputStream.java (FileInputStream): Call
FileChannelImpl(File, int).
* java/io/RandomAccessFile.java (RandomAccessFile):
Call FileChannelImpl(File, int). Switched constructors around.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99011 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/io/FileInputStream.java')
-rw-r--r-- | libjava/java/io/FileInputStream.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libjava/java/io/FileInputStream.java b/libjava/java/io/FileInputStream.java index ebd5d20ad46..c719955434f 100644 --- a/libjava/java/io/FileInputStream.java +++ b/libjava/java/io/FileInputStream.java @@ -76,7 +76,8 @@ public class FileInputStream extends InputStream * @param name The name of the file this stream should read from * * @exception SecurityException If read access to the file is not allowed - * @exception FileNotFoundException If the file does not exist. + * @exception FileNotFoundException If the file does not exist + * or if it is a directory */ public FileInputStream(String name) throws FileNotFoundException { @@ -97,7 +98,8 @@ public class FileInputStream extends InputStream * @param file The <code>File</code> object this stream should read from * * @exception SecurityException If read access to the file is not allowed - * @exception FileNotFoundException If the file does not exist. + * @exception FileNotFoundException If the file does not exist + * or if it is a directory. */ public FileInputStream(File file) throws FileNotFoundException { @@ -105,7 +107,7 @@ public class FileInputStream extends InputStream if (s != null) s.checkRead(file.getPath()); - ch = new FileChannelImpl (file.getPath(), FileChannelImpl.READ); + ch = new FileChannelImpl (file, FileChannelImpl.READ); } /** |