Here you can find the source of closeInputStream(InputStream stream)
public static void closeInputStream(InputStream stream)
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static void closeInputStream(InputStream stream) { if (stream != null) { try { stream.close();/*from ww w .java2s .c o m*/ } catch (IOException ex) { ex.printStackTrace(); } catch (Throwable ex) { ex.printStackTrace(); } } } }