mirror of
https://github.com/openRuyi-Project/gcc.git
synced 2026-06-16 00:16:04 +00:00
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. From-SVN: r99011
This commit is contained in:
committed by
Michael Koch
parent
2c80f01549
commit
b61ae8b261
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user