@Override public boolean postProcess(InputStream input, OutputStream output) { ArgumentNotValid.checkNotNull(input, "InputStream input"); ArgumentNotValid.checkNotNull(output, "OutputStream output"); // Let the loaded job handle the post processing. loadBatchJob(); return loadedJob.postProcess(input, output); }
/** * Process one file stored in the bit archive. * * @param file the file to be processed. * @param os the OutputStream to which output should be written * @return true if the file was successfully processed, false otherwise */ public boolean processFile(File file, OutputStream os) { log.trace("Started processing of file '" + file.getAbsolutePath() + "'."); ArgumentNotValid.checkNotNull(file, "File file"); ArgumentNotValid.checkNotNull(os, "OutputStream os"); return loadedJob.processFile(file, os); }
/** * Finish up the job. This is called after the last process() call. * * @param os the OutputStream to which output should be written */ public void finish(OutputStream os) { ArgumentNotValid.checkNotNull(os, "OutputStream os"); loadedJob.finish(os); }
/** * Initialize the job before runnning. This is called before the processFile() calls. * * @param os the OutputStream to which output should be written */ public void initialize(OutputStream os) { ArgumentNotValid.checkNotNull(os, "OutputStream os"); loadBatchJob(); loadedJob.initialize(os); }