try {
ArchiveDetector detector = locator.getService(ArchiveDetector.class, type);
if (detector == null) {
return false;
}
return detector.handles(archive);
} catch (IOException ioe) {
LogRecord lr = new LogRecord(Level.WARNING, EXCEPTION_CAUGHT);
Object args[] = { ioe.getMessage() };
lr.setParameters(args);
lr.setThrown(ioe);