Here you can find the source of closeQuietly(Object obj)
public static void closeQuietly(Object obj)
//package com.java2s; /*/*from ww w. ja v a 2 s. co m*/ * Copyright (C) 2015 University of Oregon * * You may distribute under the terms of either the GNU General Public * License or the Apache License, as specified in the README file. * * For more information, see the README file. */ import java.io.*; public class Main { public static void closeQuietly(Object obj) { if (obj != null) { if (obj instanceof Closeable) { try { ((Closeable) obj).close(); } catch (Exception e) { } } else { throw new ClassCastException("Not a closable Object"); } } } }