Stopwatch stop = new Stopwatch().start();
CommandLine cmdLine = buildCommandLine(file);
ByteArrayOutputStream scannerOutput = new ByteArrayOutputStream();
Executor executor = buildExecutor(scannerOutput);
try {
int exitValue = executor.execute(cmdLine);
log.debug("{} to scan file: '{}'", stop, documentName);
handleResult(exitValue, documentName, scannerOutput);
} catch (IOException e) {
// perhaps the antivirus executable was not found...
// we omit the stack exception, because it tends to be uninteresting