Here you can find the source of closeQuietly(InputStream stream)
Parameter | Description |
---|---|
stream | a parameter |
public static void closeQuietly(InputStream stream)
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.InputStream; public class Main { /**//from w w w .j a v a2 s .c o m * Quietly close a given stream, suppressing exceptions. * * @param stream */ public static void closeQuietly(InputStream stream) { if (stream == null) { return; } try { stream.close(); } catch (IOException e) { } } }