Here you can find the source of close(InputStream in)
Parameter | Description |
---|---|
in | the stream to close |
public static void close(InputStream in)
//package com.java2s; //License from project: Open Source License import java.io.InputStream; import java.io.OutputStream; public class Main { /**//from ww w . j a v a 2s . c om * Safe close of an OutputStream (no exceptions, * even if reference is null). * * @param out the stream to close */ public static void close(OutputStream out) { try { out.close(); } catch (Exception ignore) { } } /** * Safe close of an InputStream (no exceptions, * even if reference is null). * * @param in the stream to close */ public static void close(InputStream in) { try { in.close(); } catch (Exception ignore) { } } }