class TeeInputStream extends ProxyInputStream {

    @Override
    public int read() throws IOException {
        final int ch = super.read();
        if (ch != EOF) {
            branch.write(ch);
        }
        return ch;
    }

    public  TeeInputStream(final InputStream input, final OutputStream branch);
    public  TeeInputStream(
            final InputStream input, final OutputStream branch, final boolean closeBranch);

}