public final class

Flushables

extends Object
java.lang.Object
   ↳ com.google.gdata.util.common.io.Flushables

Class Overview

Utility methods for working with Flushable objects.

Summary

Fields
private static final Logger logger
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private static final Logger logger

Public Methods

public static void flush (Flushable flushable, boolean swallowIOException)

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
IOException if swallowIOException is false and flush() throws an IOException.

public static void flushQuietly (Flushable flushable)

Equivalent to calling flush(flushable, true), but with no IOException in the signature.

Parameters
flushable The Flushable object to be flushed.