mirror of
https://github.com/openRuyi-Project/gcc.git
synced 2026-06-16 00:16:04 +00:00
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:
committed by
Michael Koch
parent
04b3370bfd
commit
10b33028a2
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user