Java Stream Close closeQuietly(final Reader reader)

Here you can find the source of closeQuietly(final Reader reader)

Description

close Quietly

License

Apache License

Declaration

public static boolean closeQuietly(final Reader reader) 

Method Source Code

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

import java.io.*;

public class Main {
    public static boolean closeQuietly(final Reader reader) {
        if (reader != null) {
            try {
                reader.close();//from   ww w .  j  a  v  a 2  s  .c  o m
                return true;
            } catch (final Exception ex) {
                return false;
            }
        }
        return false;
    }
}

Related

  1. closeQuietly(Closeable input, Logger log)
  2. closeQuietly(Closeable stream)
  3. closeQuietly(Closeable stream)
  4. closeQuietly(final InputStream in)
  5. closeQuietly(final InputStream inputStream)
  6. closeQuietly(final ZipFile... zipFiles)
  7. closeQuietly(ImageInputStream ins)
  8. closeQuietly(ImageReader iReader)
  9. closeQuietly(InputStream c)