Java Stream Close close(FileReader reader, BufferedReader br)

Here you can find the source of close(FileReader reader, BufferedReader br)

Description

close

License

Apache License

Declaration

public static void close(FileReader reader, BufferedReader br) 

Method Source Code

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

import java.io.BufferedReader;
import java.io.BufferedWriter;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Main {
    public static void close(FileReader reader, BufferedReader br) {
        try {// w w w .j  a  v  a  2s  . c o  m
            if (reader != null)
                reader.close();
            if (br != null)
                br.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block

        }
    }

    public static void close(FileWriter writer, BufferedWriter bw) {
        try {
            if (writer != null)
                writer.close();
            if (bw != null)
                bw.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block

        }
    }
}

Related

  1. close(Closeable... streams)
  2. close(Collection inCloseables)
  3. close(DataOutputStream out)
  4. close(File file)
  5. close(FileReader fr)
  6. close(final Closeable resource, final String resourceId)
  7. close(final Exception e, final Closeable... objects)
  8. close(final InputStream anInputStream)
  9. close(final InputStream is)