Java Stream Close closeQuietly(Reader r)

Here you can find the source of closeQuietly(Reader r)

Description

close Quietly

License

Open Source License

Parameter

Parameter Description
errorReader2 a parameter

Declaration

private void closeQuietly(Reader r) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2005, 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
    // w  ww  . java  2  s .  c  om
 *******************************************************************************/

import java.io.IOException;

import java.io.Reader;
import java.io.Writer;

public class Main {
    /**
     * @param errorReader2
     */
    private void closeQuietly(Reader r) {
        try {
            r.close();
        } catch (IOException e) {
            // ignore
        }
    }

    private static void closeQuietly(Writer w) {
        try {
            w.close();
        } catch (IOException e) {
            // ignore
        }
    }
}

Related

  1. closeQuietly(Object object)
  2. closeQuietly(Object... o)
  3. closeQuietly(ObjectInput objectInput)
  4. closeQuietly(ObjectInput... objectInputs)
  5. closeQuietly(Reader input)
  6. closeQuietly(Reader reader)
  7. closeQuietly(Writer writer)
  8. closeQuietly(ZipFile closeable)
  9. closeQuietlyWithResult(InputStream sourceInput, boolean suppressionSourceExists)