Here you can find the source of closeSilently(final InputStream is)
public static void closeSilently(final InputStream is)
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class Main { public static void closeSilently(final InputStream is) { if (is != null) { try { is.close();/*from w ww .j a v a 2s . c om*/ } catch (final IOException ignored) { } } } public static void closeSilently(final OutputStream os) { if (os != null) { try { os.close(); } catch (final IOException ignored) { } } } }