Class Flushables

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void  flushable, boolean swallowIOException)
      Flush a , with control over whether an IOException may be thrown.
      static void  flushable)
      Equivalent to calling flush(flushable, true), but with no IOException in the signature.
      • Methods inherited from class java.lang.

        , , , , , , , , , ,
    • Method Detail

      • flush

        public static void  flushable,
                                 boolean swallowIOException)
                          throws 
        Flush a , with control over whether an IOException may be thrown.

        If swallowIOException is true, then we don't rethrow IOException, but merely log it.

        Parameters:
        flushable - the Flushable object to be flushed.
        swallowIOException - if true, don't propagate IO exceptions thrown by the flush method
        Throws:
        - if swallowIOException is false and throws an IOException.
        See Also:
        Closeables.close(java.io.Closeable, boolean)
      • flushQuietly

        public static void  flushable)
        Equivalent to calling flush(flushable, true), but with no IOException in the signature.
        Parameters:
        flushable - the Flushable object to be flushed.