diff options
author | Michael Koch <konqueror@gmx.de> | 2004-07-17 08:48:31 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2004-07-17 08:48:31 +0000 |
commit | 2ccc5a9508b416a39b63eb822ff674bcde7a9ac0 (patch) | |
tree | 03a33800885ffde6a3b199854258610e03bbd0d9 /libjava/gnu/java/nio/channels | |
parent | 61ce29b17fb82d4245d5ac288e2a2c921a3966ea (diff) | |
download | gcc-2ccc5a9508b416a39b63eb822ff674bcde7a9ac0.zip gcc-2ccc5a9508b416a39b63eb822ff674bcde7a9ac0.tar.gz gcc-2ccc5a9508b416a39b63eb822ff674bcde7a9ac0.tar.bz2 |
2004-07-17 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/channels/FileChannelImpl.java
(finalize): Added javadoc.
From-SVN: r84858
Diffstat (limited to 'libjava/gnu/java/nio/channels')
-rw-r--r-- | libjava/gnu/java/nio/channels/FileChannelImpl.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libjava/gnu/java/nio/channels/FileChannelImpl.java b/libjava/gnu/java/nio/channels/FileChannelImpl.java index f4686b2..8b3d0fc 100644 --- a/libjava/gnu/java/nio/channels/FileChannelImpl.java +++ b/libjava/gnu/java/nio/channels/FileChannelImpl.java @@ -115,11 +115,6 @@ public final class FileChannelImpl extends FileChannel this.mode = mode; } - protected void finalize() throws Throwable - { - close(); - } - public static FileChannelImpl in; public static FileChannelImpl out; public static FileChannelImpl err; @@ -137,6 +132,14 @@ public final class FileChannelImpl extends FileChannel protected native void implCloseChannel() throws IOException; + /** + * Makes sure the Channel is properly closed. + */ + protected void finalize() throws IOException + { + this.close(); + } + public int read (ByteBuffer dst) throws IOException { int result; |