requestFactory = new ContainerFileIdentificationRequestFactory();
String containerType = containerPuid.getContainerType();
if (OLE2_CONTAINER.equals(containerType)) {
try {
Ole2ContainerContentIdentifier ole2Identifier =
new Ole2ContainerContentIdentifier();
ole2Identifier.init(containerSignatureDefinitions, containerType);
Ole2IdentifierEngine ole2IdentifierEngine = new Ole2IdentifierEngine();
ole2IdentifierEngine.setRequestFactory(requestFactory);
ole2Identifier.setIdentifierEngine(ole2IdentifierEngine);
containerResults = ole2Identifier.process(
request.getSourceInputStream(), containerResults);
} catch (IOException e) { // carry on after container i/o problems
System.err.println(e + SPACE + L_BRACKET + fileName + R_BRACKET);
}
} else if (ZIP_CONTAINER.equals(containerType)) {