Package com.google.common.io
Class Flushables
- java.lang.Object
- 
- com.google.common.io.Flushables
 
- 
 @GwtIncompatible public final class Flushables extends java.lang.Object Utility methods for working withFlushableobjects.- Since:
- 1.0
- Author:
- Michael Lancaster
 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidflush(java.io.Flushable flushable, boolean swallowIOException)Flush aFlushable, with control over whether anIOExceptionmay be thrown.static voidflushQuietly(java.io.Flushable flushable)Equivalent to callingflush(flushable, true), but with noIOExceptionin the signature.
 
- 
- 
- 
Method Detail- 
flushpublic static void flush(java.io.Flushable flushable, boolean swallowIOException) throws java.io.IOException Flush aFlushable, with control over whether anIOExceptionmay be thrown.If swallowIOExceptionis true, then we don't rethrowIOException, but merely log it.- Parameters:
- flushable- the- Flushableobject to be flushed.
- swallowIOException- if true, don't propagate IO exceptions thrown by the- flushmethod
- Throws:
- java.io.IOException- if- swallowIOExceptionis false and- Flushable.flush()throws an- IOException.
- See Also:
- Closeables.close(java.io.Closeable, boolean)
 
 - 
flushQuietly@Beta public static void flushQuietly(java.io.Flushable flushable) Equivalent to callingflush(flushable, true), but with noIOExceptionin the signature.- Parameters:
- flushable- the- Flushableobject to be flushed.
 
 
- 
 
-