Class Flushables


  • @Beta
    @Deprecated(since="2022-12-01")
    public final class Flushables
    extends java.lang.Object
    Deprecated.
    The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
    Utility methods for working with Flushable objects.
    Since:
    1.0
    • Method Summary

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

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

      • flush

        public static void flush​(java.io.Flushable flushable,
                                 boolean swallowIOException)
                          throws java.io.IOException
        Deprecated.
        Flush a Flushable, 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:
        java.io.IOException - if swallowIOException is false and Flushable.flush() throws an IOException.
        See Also:
        Closeables.close(java.io.Closeable, boolean)
      • flushQuietly

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