FileDescriptor.java: Implement on top of FileChannel.
authorPer Bothner <bothner@gcc.gnu.org>
Sun, 29 Feb 2004 19:12:15 +0000 (11:12 -0800)
committerPer Bothner <bothner@gcc.gnu.org>
Sun, 29 Feb 2004 19:12:15 +0000 (11:12 -0800)
commitef3916ef8e8a15b800e293ed2555b1b60c9f96f3
treedac2f13072b5f9eb856b86bd0a047fabdd09419a
parentd5fe0403cc53ebf2b9303d8cb78f305584d02910
FileDescriptor.java: Implement on top of FileChannel.

* java/io/FileDescriptor.java:  Implement on top of FileChannel.
Remove native methods.

* java/io/natFileDescriptorEcos.cc:  Remove file.
* java/io/natFileDescriptorPosix.cc:  Remove file.
* java/io/natFileDescriptorWin32.cc:  Remove file.
* java/io/FileInputStream.java (ch):  Change type to FileChannelImpl.
(<init>(File)):  Allocate a FileChannelImpl, not a FileDescriptor.
(<init>(FileChannelImpl)):  New package-private constructor.
(<init>(FileDescriptor)):  Extract FileChannelImpl from arg.
(available, close, read, skip):  Implement using FileChannelImpl.
(getFD):  Allocate FileDescriptor if needed.
(getChannel):  Is now trivial.
* java/io/FileOutputStream.java:  Corresponding changes.
* java/io/RandomAccessFile.java:  Corresponding changes.

From-SVN: r78661
libjava/java/io/FileDescriptor.java
libjava/java/io/FileInputStream.java
libjava/java/io/FileOutputStream.java
libjava/java/io/RandomAccessFile.java
libjava/java/io/natFileDescriptorEcos.cc [deleted file]
libjava/java/io/natFileDescriptorPosix.cc [deleted file]
libjava/java/io/natFileDescriptorWin32.cc [deleted file]