Here you can find the source of closeReader(Reader reader)
Parameter | Description |
---|---|
reader | a parameter |
public static void closeReader(Reader reader)
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { /**/* www . j a v a 2s . c o m*/ * Close the given Java IO Reader and ignore any thrown exception. This is * useful for typical finally blocks in manual io code. * * @param reader */ public static void closeReader(Reader reader) { if (reader != null) { try { reader.close(); } catch (IOException ex) { ex.printStackTrace(); } catch (Throwable ex) { ex.printStackTrace(); } } } }