Java tutorial
//package com.java2s; import java.io.IOException; import java.io.InputStream; public class Main { public static void closeStreamQuietly(InputStream inputStream) { try { if (inputStream != null) { inputStream.close(); } } catch (IOException e) { // ignore exception } } }