Class Flushables
java.lang.Object
com.google.common.io.Flushables
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Flush aFlushable
, with control over whether anIOException
may be thrown.static void
flushQuietly
(Flushable flushable) Equivalent to callingflush(flushable, true)
, but with noIOException
in the signature.
-
Method Details
-
flush
Flush aFlushable
, with control over whether anIOException
may be thrown.If
swallowIOException
is true, then we don't rethrowIOException
, but merely log it.- Parameters:
flushable
- theFlushable
object to be flushed.swallowIOException
- if true, don't propagate IO exceptions thrown by theflush
method- Throws:
IOException
- ifswallowIOException
is false andFlushable.flush()
throws anIOException
.- See Also:
-
flushQuietly
Equivalent to callingflush(flushable, true)
, but with noIOException
in the signature.- Parameters:
flushable
- theFlushable
object to be flushed.
-