package org.smartx.summer.filter;

import java.io.PrintWriter;

/**
 * <p>  </p>
 *
 * <b>Creation Time:</b> 2016年11月3日
 *
 * @author binglin
 * @since summer 0.1
 */
public class TeePrintWriter extends PrintWriter {

    PrintWriter branch;

    public TeePrintWriter(PrintWriter main, PrintWriter branch) {
        super(main, true);
        this.branch = branch;
    }

    public void write(char buf[], int off, int len) {
        super.write(buf, off, len);
        super.flush();
        branch.write(buf, off, len);
        branch.flush();
    }

    public void write(String s, int off, int len) {
        super.write(s, off, len);
        super.flush();
        branch.write(s, off, len);
        branch.flush();
    }

    public void write(int c) {
        super.write(c);
        super.flush();
        branch.write(c);
        branch.flush();
    }

    public void flush() {
        super.flush();
        branch.flush();
    }
}

@@ -358,32 +358,46 @@
  branch;%0A    %7D%0A%0A
+    @Override%0A
     public void 
@@ -410,14 +410,14 @@
 char
+%5B%5D
  buf
-%5B%5D
 , in
@@ -553,32 +553,46 @@
 flush();%0A    %7D%0A%0A
+    @Override%0A
     public void 
@@ -742,32 +742,46 @@
 flush();%0A    %7D%0A%0A
+    @Override%0A
     public void 
@@ -894,24 +894,38 @@
 h();%0A    %7D%0A%0A
+    @Override%0A
     public v

add override annotation