Java Stream Close closeReader(Reader reader)

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

Description

Closes the reader

License

Open Source License

Parameter

Parameter Description
reader a parameter

Declaration

public static void closeReader(Reader reader) 

Method Source Code

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

import java.io.IOException;
import java.io.Reader;

public class Main {
    /**/* w ww  .j  av  a  2  s  .  c o  m*/
     * Closes the reader
     * @param reader
     */
    public static void closeReader(Reader reader) {
        try {
            reader.close();
        } catch (IOException e) {
            e.printStackTrace();
            throw new RuntimeException("Unable to close the reader "
                    + e.getMessage());
        }

    }
}

Related

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