diff options
author | Michael Koch <konqueror@gmx.de> | 2002-11-20 16:19:08 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2002-11-20 16:19:08 +0000 |
commit | 3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa (patch) | |
tree | 79f607cf0830a31df050e0c63c02b22944c84a26 /libjava/java/io | |
parent | e6226a2f87a75d3daf21896affc0857a94d5d4ac (diff) | |
download | gcc-3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa.zip gcc-3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa.tar.gz gcc-3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa.tar.bz2 |
2002-11-20 Michael Koch <konqueror@gmx.de>
* java/io/FileInputStream.java
(getChannel): New method.
* java/io/FileOutputStream.java
(getChannel): New method.
* java/net/ServerSocket.java
(bind): Removed duplicate code and called another bind method instead.
* java/nio/channels/SelectionKey.java
(isValid): Removed wrong exception documentation.
* java/nio/channels/ServerSocketChannel.java
(accept): Added exception documentation.
(open): Fixed typo, added exception documentation.
* java/nio/channels/spi/AbstractSelectableChannel.java
(implCloseChannel): Added exception documentation.
(add): Reformated.
(register): Added exception documentation.
From-SVN: r59307
Diffstat (limited to 'libjava/java/io')
-rw-r--r-- | libjava/java/io/FileInputStream.java | 11 | ||||
-rw-r--r-- | libjava/java/io/FileOutputStream.java | 7 |
2 files changed, 17 insertions, 1 deletions
diff --git a/libjava/java/io/FileInputStream.java b/libjava/java/io/FileInputStream.java index 6a02d2b..d7efc26 100644 --- a/libjava/java/io/FileInputStream.java +++ b/libjava/java/io/FileInputStream.java @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2001 Free Software Foundation +/* Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation This file is part of libgcj. @@ -8,6 +8,8 @@ details. */ package java.io; +import java.nio.channels.FileChannel; + /** * @author Warren Levy <warrenl@cygnus.com> * @date October 28, 1998. @@ -23,6 +25,8 @@ public class FileInputStream extends InputStream /* Contains the file descriptor for referencing the actual file. */ private FileDescriptor fd; + private FileChannel ch; + public FileInputStream(String name) throws FileNotFoundException { SecurityManager s = System.getSecurityManager(); @@ -92,4 +96,9 @@ public class FileInputStream extends InputStream long endPos = fd.seek(n, FileDescriptor.CUR, true); return endPos - startPos; } + + public FileChannel getChannel () + { + return ch; + } } diff --git a/libjava/java/io/FileOutputStream.java b/libjava/java/io/FileOutputStream.java index b592299..5ea24e5 100644 --- a/libjava/java/io/FileOutputStream.java +++ b/libjava/java/io/FileOutputStream.java @@ -10,6 +10,8 @@ details. */ package java.io; +import java.nio.channels.FileChannel; + /** * @author Tom Tromey <tromey@cygnus.com> * @date September 24, 1998 @@ -93,4 +95,9 @@ public class FileOutputStream extends OutputStream // Instance variables. private FileDescriptor fd; + + public FileChannel getChannel () + { + return null; + } } |