org.apache.oozie.util
Class MultiFileReader
java.lang.Object
java.io.Reader
org.apache.oozie.util.MultiFileReader
- All Implemented Interfaces:
- Closeable, Readable
public class MultiFileReader
- extends Reader
Implementation of a 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.
|
Method Summary |
void |
close()
|
int |
read(char[] cbuf,
int off,
int len)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiFileReader
public MultiFileReader(ArrayList<File> files)
throws IOException
- Constructs the MultiFileReader with the given files. The files will be read in the order given in the ArrayList.
- Parameters:
files - The files to read
- Throws:
IOException - If there was a problem opening the first file
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
- Specified by:
read in class Reader
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Specified by:
close in class Reader
- Throws:
IOException
Copyright © 2015 Apache Software Foundation. All Rights Reserved.