All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.xmlcalabash.util.Closer Maven / Gradle / Ivy

The newest version!
package com.xmlcalabash.util;

import java.io.Closeable;
import java.io.IOException;

/**
 * Utility methods for closing objects that implement the Closeable interface.
 */
public final class Closer {

    // prevent utility class from being created
    private Closer() {
    }

    /*
     * Closes the given Closeable, protecting against nulls.
     */
    public static void close(Closeable c) throws IOException {
        if (c != null) {
            c.close();
        }
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy