Class IOUtils


  • public final class IOUtils
    extends java.lang.Object
    A utility class with IO-specific helper methods.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void closeQuietly​(java.io.InputStream closeable)  
      static void closeQuietly​(java.io.OutputStream closeable)
      Invokes the Closeable.close() method on the given object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • closeQuietly

        public static void closeQuietly​(java.io.OutputStream closeable)
        Invokes the Closeable.close() method on the given object. If an IOException occurs during the method call, it will be caught and logged on level Level.WARNING.
        Parameters:
        closeable - the data source which should be closed (may be null).
      • closeQuietly

        public static void closeQuietly​(java.io.InputStream closeable)