diff options
author | Mark Wielaard <mark@klomp.org> | 2004-05-02 09:13:32 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2004-05-02 09:13:32 +0000 |
commit | e681542cc44babff3f29e120bd819b0b8bd6be99 (patch) | |
tree | 0f029e8bca2f2f2f60707c37f538d8217bb1cac4 | |
parent | b80f73774da5d87f58cecb3081abec8b6068f49d (diff) | |
download | classpath-e681542cc44babff3f29e120bd819b0b8bd6be99.tar.gz |
* gnu/java/nio/channels/FileChannelImpl.java (finalize): New method.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gnu/java/nio/channels/FileChannelImpl.java | 8 |
2 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,7 @@ +2004-05-02 Mark Wielaard <mark@klomp.org> + + * gnu/java/nio/channels/FileChannelImpl.java (finalize): New method. + 2004-05-01 Mark Wielaard <mark@klomp.org> * javax/swing/AbstractButton.java: Replace special HTML entities with diff --git a/gnu/java/nio/channels/FileChannelImpl.java b/gnu/java/nio/channels/FileChannelImpl.java index 2a27e1dd1..ef5f5d79a 100644 --- a/gnu/java/nio/channels/FileChannelImpl.java +++ b/gnu/java/nio/channels/FileChannelImpl.java @@ -131,6 +131,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; |