Here you can find the source of closeQuietly(ZipFile closeable)
Parameter | Description |
---|---|
closeable | a parameter |
public static void closeQuietly(ZipFile closeable)
//package com.java2s; //License from project: Open Source License import java.io.Closeable; import java.util.zip.ZipFile; public class Main { /**//from w w w. j a v a 2s .c o m * Closes a {@link Closeable} instance (like a stream or socket) * by calling its {@link Closeable#close()} method * but ignores any occuring exceptions during the call of the method. * <br> * If the parameter is null, calling this method has no effect. * * @param closeable the object to close */ public static void closeQuietly(Closeable closeable) { try { if (closeable != null) closeable.close(); } catch (Exception e) { // ignore } } /** * @see #closeQuietly(Closeable) * * @param closeable */ // Sadly, ZipFile does not implement Closeable before Java 7. public static void closeQuietly(ZipFile closeable) { try { if (closeable != null) closeable.close(); } catch (Exception e) { // ignore } } }