Here you can find the source of close(InputStream in)
public static void close(InputStream in)
//package com.java2s; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Writer; public class Main { public static void close(Writer writer) { if (writer != null) { try { writer.flush();/*from ww w . j a v a2 s .c om*/ } catch (IOException ignore) { } try { writer.close(); } catch (IOException ignore) { } } } public static void close(OutputStream out) { if (out != null) { try { out.flush(); } catch (IOException ignore) { } try { out.close(); } catch (IOException ignore) { } } } public static void close(InputStream in) { if (in != null) { try { in.close(); } catch (IOException ignore) { } } } }