Java Stream Close closeReader(BufferedReader reader)

Here you can find the source of closeReader(BufferedReader reader)

Description

close Reader

License

Apache License

Declaration

public static void closeReader(BufferedReader reader) 

Method Source Code


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

import java.io.*;

import java.util.Objects;

public class Main {
    public static void closeReader(BufferedReader reader) {
        if (Objects.isNull(reader)) {
            return;
        }//ww  w.  j a  va  2 s .c o  m
        try {
            reader.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Related

  1. closeQuietly(Reader reader)
  2. closeQuietly(Writer writer)
  3. closeQuietly(ZipFile closeable)
  4. closeQuietlyWithResult(InputStream sourceInput, boolean suppressionSourceExists)
  5. closeRandomAccessFile()
  6. closeReader(final Reader reader)
  7. closeReader(Reader r)
  8. closeReader(Reader reader)
  9. closeReader(Reader reader)