summaryrefslogtreecommitdiff
path: root/docs/jacoco-ut/bjc.everge/MirrorOutputStream.java.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/jacoco-ut/bjc.everge/MirrorOutputStream.java.html')
-rw-r--r--docs/jacoco-ut/bjc.everge/MirrorOutputStream.java.html64
1 files changed, 64 insertions, 0 deletions
diff --git a/docs/jacoco-ut/bjc.everge/MirrorOutputStream.java.html b/docs/jacoco-ut/bjc.everge/MirrorOutputStream.java.html
new file mode 100644
index 0000000..51175e0
--- /dev/null
+++ b/docs/jacoco-ut/bjc.everge/MirrorOutputStream.java.html
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>MirrorOutputStream.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">everge</a> &gt; <a href="index.source.html" class="el_package">bjc.everge</a> &gt; <span class="el_source">MirrorOutputStream.java</span></div><h1>MirrorOutputStream.java</h1><pre class="source lang-java linenums">package bjc.everge;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * An output stream that mirrors its contents to other streams.
+ *
+ * @author Ben Culkin
+ *
+ */
+public class MirrorOutputStream extends OutputStream {
+ private List&lt;OutputStream&gt; streams;
+
+ /**
+ * Create a new mirroring output stream.
+ *
+ * @param strams
+ * The output streams to mirror to.
+ */
+<span class="fc" id="L21"> public MirrorOutputStream(OutputStream... strams) {</span>
+<span class="fc" id="L22"> streams = new ArrayList&lt;&gt;();</span>
+
+<span class="fc bfc" id="L24" title="All 2 branches covered."> for (OutputStream stram : strams) {</span>
+<span class="fc" id="L25"> streams.add(stram);</span>
+ }
+<span class="fc" id="L27"> }</span>
+
+ @Override
+ public void close() throws IOException {
+<span class="nc bnc" id="L31" title="All 2 branches missed."> for (OutputStream stream : streams) {</span>
+<span class="nc" id="L32"> stream.close();</span>
+<span class="nc" id="L33"> }</span>
+<span class="nc" id="L34"> }</span>
+
+ @Override
+ public void flush() throws IOException {
+<span class="nc bnc" id="L38" title="All 2 branches missed."> for (OutputStream stream : streams) {</span>
+<span class="nc" id="L39"> stream.flush();</span>
+<span class="nc" id="L40"> }</span>
+<span class="nc" id="L41"> }</span>
+
+ @Override
+ public void write(byte[] ba) throws IOException {
+<span class="nc bnc" id="L45" title="All 2 branches missed."> for (OutputStream stream : streams) {</span>
+<span class="nc" id="L46"> stream.write(ba);</span>
+<span class="nc" id="L47"> }</span>
+<span class="nc" id="L48"> }</span>
+
+ @Override
+ public void write(byte[] ba, int off, int len) throws IOException {
+<span class="fc bfc" id="L52" title="All 2 branches covered."> for (OutputStream stream : streams) {</span>
+<span class="fc" id="L53"> stream.write(ba, off, len);</span>
+<span class="fc" id="L54"> }</span>
+<span class="fc" id="L55"> }</span>
+
+ @Override
+ public void write(int b) throws IOException {
+<span class="nc bnc" id="L59" title="All 2 branches missed."> for (OutputStream stream : streams) {</span>
+<span class="nc" id="L60"> stream.write(b);</span>
+<span class="nc" id="L61"> }</span>
+<span class="nc" id="L62"> }</span>
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.2.201808211720</span></div></body></html> \ No newline at end of file