public class MultiFileReader extends Reader
Reader
which can be used to read in multiple files sequentially. That is, when the first file ends
it will silently move to the next file and so on. If the file has a ".gz" extension, this Reader will properly handle it; all
other types of files will simply be read using a FileReader
.Constructor and Description |
---|
MultiFileReader(ArrayList<File> files)
Constructs the MultiFileReader with the given files.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
read(char[] cbuf,
int off,
int len) |
public MultiFileReader(ArrayList<File> files) throws IOException
files
- The files to readIOException
- If there was a problem opening the first filepublic int read(char[] cbuf, int off, int len) throws IOException
read
in class Reader
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Reader
IOException
Copyright © 2018 Apache Software Foundation. All rights reserved.