Here you can find the source of closeQuietly(InputStream in)
public static void closeQuietly(InputStream in)
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { /** Close quietly */ public static void closeQuietly(Reader in) { try {/*from ww w .ja va 2 s. c om*/ if (in != null) in.close(); } catch (Throwable t) { System.out.println("[WARN] Unable to close input (e=" + t + ")"); } } /** Close quietly */ public static void closeQuietly(Writer out) { try { if (out != null) out.close(); } catch (Throwable t) { System.out.println("[WARN] Unable to close output (e=" + t + ")"); } } /** Close a stream */ public static void closeQuietly(InputStream in) { try { if (in != null) in.close(); } catch (Throwable t) { System.out.println("[WARN] Unable to close input (e=" + t + ")"); } } }