diff options
| author | Mark Wielaard <mark@klomp.org> | 2003-02-20 15:41:20 +0000 |
|---|---|---|
| committer | Mark Wielaard <mark@klomp.org> | 2003-02-20 15:41:20 +0000 |
| commit | f60b578e1a5a8598e69531da7fc0a496e1bd263f (patch) | |
| tree | 30f84cd5111afcd68057106b8a22f469b90ec8a3 /java/util/zip/ZipFile.java | |
| parent | 6f39289efc8424d4aed3d9be8b1cbcd8c0d46402 (diff) | |
| download | classpath-f60b578e1a5a8598e69531da7fc0a496e1bd263f.tar.gz | |
* java/util/zip/ZipFile.java (finalize): New method.
Diffstat (limited to 'java/util/zip/ZipFile.java')
| -rw-r--r-- | java/util/zip/ZipFile.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/java/util/zip/ZipFile.java b/java/util/zip/ZipFile.java index 4b027b088..8f7ef6f8d 100644 --- a/java/util/zip/ZipFile.java +++ b/java/util/zip/ZipFile.java @@ -305,6 +305,15 @@ public class ZipFile implements ZipConstants } /** + * Calls the <code>close()</code> method when this ZipFile has not yet + * been explicitly closed. + */ + protected void finalize() throws IOException + { + if (!closed) close(); + } + + /** * Returns an enumeration of all Zip entries in this Zip file. */ public Enumeration entries() |
