Reputation: 437
I need to scan a s3 object (jpeg, pdf) in my java application by Eset virus scanner.
S3Object s3Object = s3Client.getObject("bucket", "key);
So I get S3 object and here is the command line that I should use
@SBINDIR@/esets_scan [option(s)] FILES
How can I use this command line in a java application?
Upvotes: 0
Views: 186
Reputation: 199234
You can execute the scan using ProcessBuilder
ProcessBuilder pb = new ProcessBuilder("esets_scan", "s3FileName");
Of course, you have to save your object to a file first and add more code to process the output of the scanner.
Upvotes: 1