code: public static void closeQuietly(final ImageOutputStream aImageOutputStream) {
          if (aImageOutputStream != null) {
              try {
                  aImageOutputStream.close();
              } catch (final IOException details) {
                  LOGGER.error(details.getMessage(), details);
              }
          }
      }
docs: Closes an image output stream, catching and logging any exceptions.
  
  @param aImageOutputStream A supplied image output stream to close