I am wondering if there is any ideomatic way to associate multiple InputStreams with one continuous InputStream in Java (or Scala).
To do this, I need to parse the flat files that I upload over the network from an FTP server. I want to make a file [1..N], open the streams, and then combine them into one stream. Therefore, when file1 comes to an end, I want to start reading from file2, and so on, until I get to the end of fileN.
I need to read these files in a certain order, the data comes from an inherited system that creates files in bars, so the data in one depends on the data in the other file, but I would like to process them as one continuous stream to simplify my logical domain interface.
I searched and found PipedInputStream, but I'm not sure if this is what I need. An example will be helpful.
java scala io inputstream
Magnus Jan 12 '13 at 16:02 2013-01-12 16:02
source share