wt.util
Class FileConsumer
java.lang.Object
wt.util.Consumer
wt.util.FileConsumer
- All Implemented Interfaces:
- Iterator
- Direct Known Subclasses:
- PropertiesConsumer
- public class FileConsumer
- extends Consumer
An iteration over a list of files.
Supported API: false
Extendable: false
DEFAULT_SEPARATOR
protected static final String DEFAULT_SEPARATOR
- See Also:
- Constant Field Values
FileConsumer
public FileConsumer(String[] files,
int max_buffer_size)
- Parameters:
files
- An array of files to be consumed.
FileConsumer
public FileConsumer(String files)
- Parameters:
files
- A comma-separated list of files.
FileConsumer
public FileConsumer(String files,
String separator)
- Parameters:
files
- A list of files delineated by the separator parameter.separator
- The separator for the files parameter.
FileConsumer
public FileConsumer(String files,
String separator,
int max_buffer_size)
- Parameters:
files
- A list of files delineated by the separator parameter.separator
- The separator for the files parameter.
FileConsumer
public FileConsumer(String[] files)
- Parameters:
files
- An array of files to be consumed.
getCurrentFile
public String getCurrentFile()
- Returns:
- The file that is currently being consumed or null if all the files have been iterated over.
createQueue
protected final Consumer.Queue createQueue(int max_buffer_size)
- Override createQueue to create a FileConsumerQueue
- Overrides:
createQueue
in class Consumer
- Parameters:
max_buffer_size
- The maximum size the queue can attain.
createProducer
protected Consumer.Producer createProducer(String[] files)
- Hook to let subclasses create a different producer.
- Parameters:
files
- The list of files to be loaded.
parseFiles
private static final String[] parseFiles(String files,
String separator)