Here you can find the source of closeStreams(List
public static void closeStreams(List<Closeable> streams)
//package com.java2s; import java.io.Closeable; import java.io.IOException; import java.util.List; public class Main { public static void closeStreams(List<Closeable> streams) { if (streams == null) return; for (Closeable str : streams) { closeQuitely(str);/*from ww w .j av a2 s.c o m*/ } } public static void closeQuitely(Closeable c) { if (c == null) return; try { c.close(); } catch (IOException e) { // ignore } } }