Java Stream Close closeBufferedReader(BufferedReader bufferedReader)

Here you can find the source of closeBufferedReader(BufferedReader bufferedReader)

Description

close Buffered Reader

License

Open Source License

Parameter

Parameter Description

Declaration

public final static void closeBufferedReader(BufferedReader bufferedReader) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.BufferedReader;
import java.io.IOException;

public class Main {
    /**/* www  .j av  a  2 s.  c om*/
     * @param bufferedReader: opened file in reader mode; it can be null
     * */
    public final static void closeBufferedReader(BufferedReader bufferedReader) {
        if (null != bufferedReader) {
            try {
                bufferedReader.close();
            } catch (IOException e) {
                /*recursive try/catch*/}
        }
    }
}

Related

  1. closeAll(Iterable closeables)
  2. closeAll(T... io)
  3. closeAllStreamsQuietly(final Closeable... closeables)
  4. closeAndRethrow(final Exception e, final Closeable... channels)
  5. closeBufferedFile(BufferedReader reader)
  6. closeCloseableIfNotNull(Closeable fileWriter)
  7. closeConnection(Closeable... closes)
  8. closeDataLine(final SourceDataLine line, final AudioInputStream ais)
  9. closeDebugFile()