public static void close (OutputStream out)
    {
        if (out != null) {
            try {
                out.close();
            } catch (IOException ioe) {
                log.warning("Error closing output stream", "stream", out, "cause", ioe);
            }
        }
    }
public static void close ( OutputStream out ) { if ( out != null ) { try { out . close ( ) ; } catch ( IOException ioe ) { log . warning ( "Error closing output stream" , "stream" , out , "cause" , ioe ) ; } } }
Convenient close for a stream. Use in a finally clause and love life.