Package uk.gov.nationalarchives.droid.core.interfaces

Examples of uk.gov.nationalarchives.droid.core.interfaces.IdentificationRequest


                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);
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.core.interfaces.IdentificationRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.