Here you can find the source of closeReader(final Reader reader)
Parameter | Description |
---|---|
reader | Reader to close. |
public static void closeReader(final Reader reader)
//package com.java2s; /* See LICENSE for licensing and NOTICE for copyright. */ import java.io.IOException; import java.io.Reader; public class Main { /**/*from ww w . j a v a 2 s .com*/ * Closes the given reader and swallows exceptions that may arise during the * process. * * @param reader Reader to close. */ public static void closeReader(final Reader reader) { try { reader.close(); } catch (IOException e) { System.err.println("Error closing " + reader + ": " + e); } } }