MCPcopy Create free account
hub / github.com/antlr/codebuff / flush

Method flush

corpus/java/training/guava/io/Flushables.java:51–61  ·  view source on GitHub ↗

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. @param flushable the Flushable object to be flushed. @param swallowIOException if true, don't p

(Flushable flushable, boolean swallowIOException)

Source from the content-addressed store, hash-verified

49 * @see Closeables#close
50 */
51 public static void flush(Flushable flushable, boolean swallowIOException) throws IOException {
52 try {
53 flushable.flush();
54 } catch (IOException e) {
55 if (swallowIOException) {
56 logger.log(Level.WARNING, "IOException thrown while flushing Flushable.", e);
57 } else {
58 throw e;
59 }
60 }
61 }
62
63 /**
64 * Equivalent to calling {@code flush(flushable, true)}, but with no {@code IOException} in the

Callers 8

flushQuietlyMethod · 0.95
writeMethod · 0.45
writeFromMethod · 0.45
readMethod · 0.45
writeMethod · 0.45
writeLinesMethod · 0.45
writeFromMethod · 0.45
execMethod · 0.45

Calls 1

logMethod · 0.80

Tested by

no test coverage detected