How to create an InputStream of files that have a certain extension in Java? -


i have lot of files in directory want read ones extension (say .txt). want these files added same bufferedinputstream can read them in 1 go. when call read() @ end of file, next 1 should begin.

it feels there should obvious answer had no luck finding it.

you might want take @ sequenceinputstream:

a sequenceinputstream represents logical concatenation of other input streams. starts out ordered collection of input streams , reads first 1 until end of file reached, whereupon reads second one, , on, until end of file reached on last of contained input streams.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -