new RequestMetaData(file.length(), file.lastModified(), fileName);
RequestIdentifier identifier = new RequestIdentifier(uri);
identifier.setParentId(1L);
InputStream in = null;
IdentificationRequest request = new FileSystemIdentificationRequest(metaData, identifier);
try {
in = new FileInputStream(file);
request.open(in);
IdentificationResultCollection results =
binarySignatureIdentifier.matchBinarySignatures(request);
resultPrinter.print(results, request);
} catch (FileNotFoundException fnfe) {
log.error("error processing files", fnfe);
throw new CommandExecutionException(fnfe);
} catch (IOException e) {
throw new CommandExecutionException(e);
} finally {
if (in != null) {
try {
request.close();
file=null;
in.close();
} catch (IOException e) {
throw new CommandExecutionException(e);