Here you can find the source of closeQuietly(InputStream input)
public static void closeQuietly(InputStream input)
//package com.java2s; //License from project: Apache License import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class Main { public static void closeQuietly(InputStream input) { closeQuietly((Closeable) input); }/* w w w .ja v a 2 s .c om*/ public static void closeQuietly(OutputStream output) { closeQuietly((Closeable) output); } public static void closeQuietly(Closeable closeable) { try { if (closeable != null) { closeable.close(); } } catch (IOException e) { e.printStackTrace(); } } public static void closeQuietly(Closeable... closeables) { for (Closeable closeable : closeables) { closeQuietly(closeable); } } }