Java InputStream Close close(InputStream inputStream)

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

Description

close

License

Open Source License

Declaration

public static void close(InputStream inputStream) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2011 Frank Appel 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:// ww  w. j  a va  2s .c  om
 *    Frank Appel - initial API and implementation
 *    EclipseSource - ongoing development
 ******************************************************************************/

import java.io.*;

public class Main {
    public static void close(InputStream inputStream) {
        try {
            inputStream.close();
        } catch (IOException ioe) {
            throw new RuntimeException("Failed to close input stream.", ioe);
        }
    }
}

Related

  1. close(InputStream in)
  2. close(InputStream in)
  3. close(InputStream in, boolean silent)
  4. close(InputStream in, OutputStream out)
  5. close(InputStream input)
  6. close(InputStream inputstream)
  7. close(InputStream inputStream)
  8. close(InputStream is)
  9. close(InputStream is)