Here you can find the source of closeStream(FileInputStream in)
public static final void closeStream(FileInputStream in)
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static final void closeStream(InputStream in) { if (in != null) { try { in.close();//from w ww . jav a 2s . c om } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } public static final void closeStream(FileInputStream in) { if (in != null) { try { in.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } public static final void closeStream(FileOutputStream in) { if (in != null) { try { in.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } public static final void closeStream(OutputStream out) { if (out != null) { try { out.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } /** * * @param raf */ public static final void closeStream(RandomAccessFile raf) { if (raf != null) { try { raf.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } public static void closeStream(Writer wr) { if (wr != null) { try { wr.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }