Code example for Closeable

Methods: close

public class IOUtil { 
    public static void closeQuietly(Closeable closeable) {
        if (closeable != null) {
            try { 
            } catch (Exception ignored) {
     * Get a usable cache directory (external if available, internal otherwise). 
     * @param context The context to use 
     * @param uniqueName A unique directory name to append to the cache dir 
     * @return The cache dir 
    public static File getDiskCacheDir(Context context, String uniqueName) {
        // Check if media is mounted or storage is built-in, if so, try and use external cache dir 
Contextual code suggestions in your IDE  Get Codota for Java