2003-03-20 Michael Koch <konqueror@gmx.de>

* java/io/FileInputStream.java
	(getChannel): New implementation.
	* java/io/FileOutputStream.java
	(ch): New member variable.
	(getChannel): Implemented.
	* java/io/RandomAccessFile.java
	(RandomAccessFile): Throws FileNotFoundException instead of
	IOException.
	(getChannel): New method.
	(ch): New member variable.

From-SVN: r64609
This commit is contained in:
Michael Koch
2003-03-20 07:54:24 +00:00
committed by Michael Koch
parent 04b3370bfd
commit 10b33028a2
4 changed files with 50 additions and 7 deletions
+8 -1
View File
@@ -34,6 +34,7 @@ exception statement from your version. */
package java.io;
import java.nio.channels.FileChannel;
import gnu.java.nio.FileChannelImpl;
/**
* @author Warren Levy <warrenl@cygnus.com>
@@ -124,6 +125,12 @@ public class FileInputStream extends InputStream
public FileChannel getChannel ()
{
return ch;
synchronized (this)
{
if (ch == null)
ch = new FileChannelImpl (fd, false, this);
return ch;
}
}
}