code: public static void close(InputStream is) {
          if (is != null) {
              try {
                  is.close();
              } catch (IOException e) {
                  log.warn("Error closing input stream.", e);
              }
          }
      }
docs: Convenience method that closes the specified {@link InputStream InputStream}, logging any
  {@link IOException IOException} that might occur. If the {@code InputStream}
  argument is {@code null}, this method does nothing.  It returns quietly in all cases.
  
  @param is the {@code InputStream} to close, logging any {@code IOException} that might occur.