Package dk.netarkivet.common.utils.batch
Class BatchLocalFiles
- java.lang.Object
-
- dk.netarkivet.common.utils.batch.BatchLocalFiles
-
public class BatchLocalFiles extends Object
Class for running FileBatchJobs on a set of local files. The constructor takes an array of files to be processed and the run() method takes a FileBatchJob and applies it to each file in turn.
-
-
Constructor Summary
Constructors Constructor Description BatchLocalFiles(File[] incomingFiles)
Given an array of files, constructs a BatchLocalFiles instance to be used in running a batch job over those files.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run(FileBatchJob job, OutputStream os)
Run the given job on the files associated with this object.
-
-
-
Constructor Detail
-
BatchLocalFiles
public BatchLocalFiles(File[] incomingFiles) throws ArgumentNotValid
Given an array of files, constructs a BatchLocalFiles instance to be used in running a batch job over those files.- Parameters:
incomingFiles
- The files that should be used processed by the batchjob- Throws:
ArgumentNotValid
- if incomingFiles is null or contains a null entry
-
-
Method Detail
-
run
public void run(FileBatchJob job, OutputStream os)
Run the given job on the files associated with this object.- Parameters:
job
- - the job to be executedos
- - the OutputStream to which output data is written
-
-