MCPcopy Create free account
hub / github.com/davidgiven/luje / close

Method close

lib/java/io/PrintStream.java:244–255  ·  view source on GitHub ↗

Closes this print stream. Flushes this stream and then closes the target stream. If an I/O error occurs, this stream's error state is set to true.

()

Source from the content-addressed store, hash-verified

242 * {@code true}.
243 */
244 @Override
245 public synchronized void close() {
246 flush();
247 if (out != null) {
248 try {
249 out.close();
250 out = null;
251 } catch (IOException e) {
252 setError();
253 }
254 }
255 }
256
257 /**
258 * Ensures that all pending data is sent out to the target stream. It also

Callers

nothing calls this directly

Calls 3

flushMethod · 0.95
setErrorMethod · 0.95
closeMethod · 0.65

Tested by

no test coverage detected