Here you can find the source of close(Closeable closeable, boolean swallowIOException)
public static void close(Closeable closeable, boolean swallowIOException) throws IOException
//package com.java2s; //License from project: Apache License import java.io.Closeable; import java.io.IOException; public class Main { public static void close(Closeable closeable, boolean swallowIOException) throws IOException { if (closeable != null) { try { closeable.close();/* ww w . j a va2 s .c om*/ } catch (IOException e) { if (!swallowIOException) { throw e; } } } } }