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

Method close

lib/java/io/FilterOutputStream.java:57–77  ·  view source on GitHub ↗

Closes this stream. This implementation closes the target stream. @throws IOException if an error occurs attempting to close this stream.

()

Source from the content-addressed store, hash-verified

55 * if an error occurs attempting to close this stream.
56 */
57 @Override
58 public void close() throws IOException {
59 Throwable thrown = null;
60 try {
61 flush();
62 } catch (Throwable e) {
63 thrown = e;
64 }
65
66 try {
67 out.close();
68 } catch (Throwable e) {
69 if (thrown == null) {
70 thrown = e;
71 }
72 }
73
74 if (thrown != null) {
75 SneakyThrow.sneakyThrow(thrown);
76 }
77 }
78
79 /**
80 * Ensures that all pending data is sent out to the target stream. This

Callers

nothing calls this directly

Calls 3

flushMethod · 0.95
sneakyThrowMethod · 0.95
closeMethod · 0.65

Tested by

no test coverage detected