Java tutorial
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.OutputStream; public class Main { public static void closeOutputStream(OutputStream os) { if (os != null) { try { os.close(); } catch (IOException e) { //pass } finally { os = null; } } } }