Skip to content

Cancelling a FileSystemIdentificationRequest / Droid execution reliably #1383

Description

@Fab8711

Hello,

we have integrated Droid in our java application, however we would like to know what is the appropriate way to abort a FileSystemIdentificationRequest if it takes too much time. Is calling close on the request / interrupting the thread running the code sufficient or what is the best way to get a reliable abort from the API? Code fragment in use as example:

            RequestMetaData metadata = new RequestMetaData(Files.size(filePath), Files.getLastModifiedTime(filePath).toMillis(), fileName);
            RequestIdentifier identifier = new RequestIdentifier(file.toURI());

            droidRequest = new FileSystemIdentificationRequest(metadata, identifier);
            droidRequest.open(filePath);
            IdentificationResultCollection results = binSigIdentifier.matchBinarySignatures(droidRequest);  // <= used here

            IdentificationResultCollection containerResults = identifyContainer(droidRequest, results);     // <= and here

Thank you

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions