Here you can find the source of closeIgnoreExceptions(Closeable c)
Parameter | Description |
---|---|
c | some closeable stream (CSVWriter/Readers in this project) |
public static boolean closeIgnoreExceptions(Closeable c)
//package com.java2s; //License from project: Open Source License import java.io.Closeable; import java.io.IOException; public class Main { /**//from w ww .ja v a2 s.c o m * Closes a data stream, ignoring any IOExceptions thrown * @param c some closeable stream (CSVWriter/Readers in this project) * @return true if everything closed, false if IOException thrown */ public static boolean closeIgnoreExceptions(Closeable c) { if (c != null) { try { c.close(); } catch (IOException e) { e.printStackTrace(); return false; } } return true; } }