Here you can find the source of closeStream(Closeable... streams)
public static void closeStream(Closeable... streams)
//package com.java2s; //License from project: Apache License import java.io.Closeable; public class Main { public static void closeStream(Closeable... streams) { if (streams == null) return; for (Closeable stream : streams) { CloseOneStream(stream);/* w w w.j a va2 s . co m*/ } } private static void CloseOneStream(Closeable stream) { if (stream != null) { try { stream.close(); } catch (Exception e) { e.printStackTrace(); } } } }