Class TeeInputStream

java.lang.Object
java.io.InputStream
org.eclipse.jgit.util.io.TeeInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class TeeInputStream extends InputStream
Input stream that copies data read to another output stream. This stream is primarily useful with a TemporaryBuffer, where any data read or skipped by the caller is also duplicated into the temporary buffer. Later the temporary buffer can then be used instead of the original source stream. During close this stream copies any remaining data from the source stream into the destination stream.