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:
parent
04b3370bfd
commit
10b33028a2
4 changed files with 50 additions and 7 deletions
|
@ -39,6 +39,7 @@ exception statement from your version. */
|
|||
package java.io;
|
||||
|
||||
import java.nio.channels.FileChannel;
|
||||
import gnu.java.nio.FileChannelImpl;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
|
@ -147,11 +148,18 @@ public class FileOutputStream extends OutputStream
|
|||
fd.close();
|
||||
}
|
||||
|
||||
// Instance variables.
|
||||
private FileDescriptor fd;
|
||||
|
||||
public FileChannel getChannel ()
|
||||
{
|
||||
return null;
|
||||
synchronized (this)
|
||||
{
|
||||
if (ch == null)
|
||||
ch = new FileChannelImpl (fd, true, this);
|
||||
|
||||
return ch;
|
||||
}
|
||||
}
|
||||
|
||||
// Instance variables.
|
||||
private FileDescriptor fd;
|
||||
private FileChannel ch;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue