Class TeeInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class TeeInputStream
    extends FilterInputStream
    Class to copy a stream to a file or another stream as it is being sent through a stream pipe E.g.
        Reader r = new InputStreamReader(new TeeInputStream(new FileInputStream("file"), new File("otherfile")));