javadoc.com.google.common.io.Flushables.html Maven / Gradle / Ivy
Flushables (Guava: Google Core Libraries for Java - release 05)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
com.google.common.io
Class Flushables
java.lang.Object
com.google.common.io.Flushables
Utility methods for working with Flushable
objects.
- Since:
- 1
- Author:
- Michael Lancaster
Method Summary | |
---|---|
static void |
flush(Flushable flushable,
boolean swallowIOException)
Flush a Flushable , with control over whether an
IOException may be thrown. |
static void |
flushQuietly(Flushable flushable)
Equivalent to calling flush(flushable, true) , but with no
IOException in the signature. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
flush
public static void flush(Flushable flushable, boolean swallowIOException) throws IOException
- Flush a
Flushable
, 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:
Closeables.close(java.io.Closeable, boolean)
flushQuietly
public static void flushQuietly(Flushable flushable)
- Equivalent to calling
flush(flushable, true)
, but with noIOException
in the signature.- Parameters:
flushable
- theFlushable
object to be flushed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |