Java IO: SequenceInputStream
SequenceInputStream combines two or more other
InputStream's into one. First all bytes from the
first input stream is iterated and returned, then the bytes from the second input stream. Here is a simple
InputStream input1 = new FileInputStream("c:\\data\\file1.txt"); InputStream input2 = new FileInputStream("c:\\data\\file2.txt"); InputStream combined = new SequenceInputStream(input1, input2);
The combined input stream can now be used as if it was one coherent stream.