Here you can find the source of closeStream(Object oin)
public static void closeStream(Object oin)
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class Main { public static void closeStream(Object oin) { if (oin != null) try { if (oin instanceof InputStream) ((InputStream) oin).close(); if (oin instanceof OutputStream) ((OutputStream) oin).close(); } catch (IOException e) { e.printStackTrace();/* w w w. j a v a 2 s . co m*/ } } }