Java Stream Close closeQuietly(Writer writer)

Here you can find the source of closeQuietly(Writer writer)

Description

close Quietly

License

Apache License

Declaration

public static void closeQuietly(Writer writer) 

Method Source Code

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

import java.io.Closeable;
import java.io.IOException;
import java.io.Writer;

public class Main {
    public static void closeQuietly(Closeable closeable) {
        try {//from   www . java  2 s. c  om
            if (closeable != null) {
                closeable.close();
            }
        } catch (IOException ioe) {
            // ignore
        }
    }

    public static void closeQuietly(Writer writer) {
        closeQuietly((Closeable) writer);
    }
}

Related

  1. closeQuietly(ObjectInput objectInput)
  2. closeQuietly(ObjectInput... objectInputs)
  3. closeQuietly(Reader input)
  4. closeQuietly(Reader r)
  5. closeQuietly(Reader reader)
  6. closeQuietly(ZipFile closeable)
  7. closeQuietlyWithResult(InputStream sourceInput, boolean suppressionSourceExists)
  8. closeRandomAccessFile()
  9. closeReader(BufferedReader reader)