Java Stream Close closeReader(Reader rReader)

Here you can find the source of closeReader(Reader rReader)

Description

Closes a reader.

License

Apache License

Parameter

Parameter Description
rReader The reader to be closed. If it is null, this method does nothing.

Declaration

public static void closeReader(Reader rReader) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.IOException;

import java.io.Reader;

public class Main {
    /**/*from  w  ww .jav a  2  s .  com*/
     * Closes a reader. This ignores all exceptions that might be thrown.
     *
     * @param  rReader  The reader to be closed. If it is null, this method does nothing.
     */
    public static void closeReader(Reader rReader) {
        try {
            if (rReader != null) {
                rReader.close();
            }
        } catch (IOException ignored) {
        }
    }
}

Related

  1. closeReader(BufferedReader reader)
  2. closeReader(final Reader reader)
  3. closeReader(Reader r)
  4. closeReader(Reader reader)
  5. closeReader(Reader reader)
  6. closeRelaxed(Closeable resource)
  7. closeReportFile()
  8. closeResource(final Closeable aResource)
  9. closeSafe(InputStream inputStream)