List of usage examples for com.google.common.io Flushables flush
public static void flush(Flushable flushable, boolean swallowIOException) throws IOException
From source file:com.puppycrawl.tools.checkstyle.PropertyCacheFile.java
/** * Flushes and closes output stream./*from w w w.ja v a 2 s. c om*/ * @param stream the output stream * @throws IOException when there is a problems with file flush and close */ private static void flushAndCloseOutStream(OutputStream stream) throws IOException { if (stream != null) { Flushables.flush(stream, false); } Closeables.close(stream, false); }