Java Stream Close closeStream(InputStream inputStream)

Here you can find the source of closeStream(InputStream inputStream)

Description

close Stream

License

Open Source License

Declaration

private static void closeStream(InputStream inputStream) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2001, 2010 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
 *
 * Contributors:/*from  ww  w  .j a v  a2s  . c om*/
 *     IBM Corporation - initial API and implementation
 *     Jens Lukowski/Innoopract - initial renaming/restructuring
 *     
 *******************************************************************************/

import java.io.IOException;
import java.io.InputStream;

public class Main {
    private static void closeStream(InputStream inputStream) {
        try {
            inputStream.close();
        } catch (IOException e) {
            // no cleanup can be done
        }
    }
}

Related

  1. closeStream(final InputStream stream)
  2. closeStream(final java.io.Closeable stream)
  3. closeStream(final Object stream)
  4. closeStream(InputStream in)
  5. closeStream(InputStream in)
  6. closeStream(InputStream ins)
  7. closeStream(Object oin)
  8. closeStream(OutputStream os)
  9. closeStreamIgnoreExpection(InputStream stream)