All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.novetta.ibg.common.sys.EchoingStreamPumper Maven / Gradle / Ivy

The newest version!
/*
 * (c) 2012 IBG LLC
 */
package com.novetta.ibg.common.sys;

import java.io.InputStream;
import java.io.OutputStream;
import org.apache.tools.ant.taskdefs.StreamPumper;

/**
 * Class that 
 *  @author mchaberski
 */
public class EchoingStreamPumper extends StreamPumper {

    private final EchoingOutputStream os;
    
    public EchoingStreamPumper(InputStream is, OutputStream os, 
            boolean closeWhenExhausted, boolean useAvailable) {
        this(is, new EchoingOutputStream(os), closeWhenExhausted, useAvailable);
    }
    
    private EchoingStreamPumper(InputStream is, EchoingOutputStream os, 
            boolean closeWhenExhausted, boolean useAvailable) {
        super(is, os, closeWhenExhausted, useAvailable);
        this.os = os;
    }

    public EchoingOutputStream getEchoingOutputStream() {
        return os;
    }
}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy