Here you can find the source of close(InputStream is)
public static void close(InputStream is)
//package com.java2s; //License from project: Academic Free License import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import java.io.Writer; public class Main { /**//from www.ja v a 2 s . c o m * Close the output stream and trap any exceptions. */ public static void close(OutputStream os) { if (os != null) { try { os.close(); } catch (Exception ex) { } } } public static void close(Writer fw) { if (fw != null) { try { fw.close(); } catch (Exception ex) { } ; } } /** * Close the input stream and trap any exceptions. */ public static void close(InputStream is) { if (is != null) { try { is.close(); } catch (Exception ex) { } } } /** * Close the reader. * * @param r */ public static void close(Reader r) { if (r != null) { try { r.close(); } catch (Exception ex) { } } } }