Here you can find the source of close(InputStream is)
Parameter | Description |
---|---|
is | InputStream to close |
public static void close(InputStream is)
//package com.java2s; /*// w w w. j av a 2 s . c o m * JLib - Publicitas Java library v1.2.0. * * Copyright (c) 2005, 2006, 2007, 2008, 2009 Publicitas SA. * Licensed under LGPL (LGPL-LICENSE.txt) license. */ import java.io.InputStream; import java.io.OutputStream; public class Main { /** * Close an InputStream * * @param is InputStream to close */ public static void close(InputStream is) { if (is != null) { try { is.close(); } catch (Exception ex) { } } } /** * Close an OutputStream * * @param os OutputStream to close */ public static void close(OutputStream os) { if (os != null) { try { os.close(); } catch (Exception ex) { } } } }