MCPcopy
hub / github.com/apache/commons-io / closeQuietly

Method closeQuietly

src/main/java/org/apache/commons/io/IOUtils.java:216–218  ·  view source on GitHub ↗

Closes an Reader unconditionally. Equivalent to Reader#close(), except any exceptions will be ignored. This is typically used in finally blocks. Example code: char[] data = new char[1024]; Reader in = null; try { in = new FileReader("foo.txt"); in

(final Reader input)

Source from the content-addressed store, hash-verified

214 * @param input the Reader to close, may be null or already closed
215 */
216 public static void closeQuietly(final Reader input) {
217 closeQuietly((Closeable) input);
218 }
219
220 /**
221 * Closes an <code>Writer</code> unconditionally.

Calls 1

closeMethod · 0.45