Java InputStream Close close(InputStream is)

Here you can find the source of close(InputStream is)

Description

close

License

Open Source License

Declaration

public static void close(InputStream is) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2018 Arrow Electronics, Inc.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License 2.0
 * which accompanies this distribution, and is available at
 * http://apache.org/licenses/LICENSE-2.0
 *
 * Contributors://from   ww  w . j  av  a  2s .co  m
 *     Arrow Electronics, Inc.
 *******************************************************************************/

import java.io.Closeable;

import java.io.InputStream;

public class Main {
    public static void close(InputStream is) {
        try {
            if (is != null)
                is.close();
        } catch (Throwable t) {
        }
    }

    public static void close(Closeable closeable) {
        try {
            if (closeable != null)
                closeable.close();
        } catch (Throwable t) {
        }
    }
}

Related

  1. close(InputStream inputstream)
  2. close(InputStream inputStream)
  3. close(InputStream is)
  4. close(InputStream is)
  5. close(InputStream is)
  6. close(InputStream is)
  7. close(InputStream is)
  8. close(InputStream is)
  9. close(InputStream is)