code: public static void safelyClose(OutputStream stream) {
  		if(stream != null) {
  			try {
  				stream.close();
  			} catch(IOException e) {
  				logger.warn("error closing internal output stream, this may lead to a stream leak", e);
  			}
  		}
  	}
docs: Tries to close the given stream; if any exception is thrown in the process,
  it suppresses it.
  
  @param stream
  the output stream to be closed.