DroidDetector implements Detector { public void setAllowMatchByFileExtension( boolean allowMatchByFileExtension) { this.allowMatchByFileExtension = allowMatchByFileExtension; } DroidDetector();  DroidDetector(File fileSignaturesFile, File containerSignaturesFile); boolean isAllowMatchByFileExtension(); void setAllowMatchByFileExtension(
            boolean allowMatchByFileExtension); boolean isMatchAllExtensions(); void setMatchAllExtensions(boolean matchAllExtensions); boolean isPassFilenameWithInputStream(); void setPassFilenameWithInputStream(
            boolean passFilenameWithInputStream); boolean isBinarySignaturesOnly(); void setBinarySignaturesOnly(boolean binarySignaturesOnly); long getMaxBytesToScan(); void setMaxBytesToScan(long maxBytesToScan); MediaType detect(File file); List<IdentificationResult> detectPUIDs(File file); @Override MediaType detect(InputStream input, Metadata metadata); List<IdentificationResult> detectPUIDs(InputStream input,
			Metadata metadata); static MediaType getMimeTypeFromResult(IdentificationResult result); static MediaType getMimeTypeFromResults(
			List<IdentificationResult> results); String getBinarySignatureFileVersion(); FFSignatureFile getBinarySignatures(); ContainerSignatureDefinitions getContainerSignatures(); static void main(String[] args);  }
@Test public void testDetectByExtension() throws FileNotFoundException, IOException, CommandExecutionException { DroidDetector dde = new DroidDetector(); innerTestDetectInputStreamMetadata(dde, "src/test/resources/plain-text.txt", "application/octet-stream"); dde.setAllowMatchByFileExtension(true); innerTestDetectInputStreamMetadata(dde, "src/test/resources/plain-text.txt", "text/plain"); }