Java tutorial
//package com.java2s; import java.io.IOException; import java.io.OutputStream; public class Main { /** * close OutputStream * @param out */ public static void closeOutputStream(OutputStream out) { if (out != null) { try { out.close(); out = null; } catch (IOException e) { e.printStackTrace(); } } } }