2004-07-17 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/channels/FileChannelImpl.java (finalize): Added javadoc. From-SVN: r84858
This commit is contained in:
committed by
Michael Koch
parent
61ce29b17f
commit
2ccc5a9508
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user