use of org.bouncycastle.tsp.cms.CMSTimeStampedDataParser in project tika by apache.
the class TSDParser method parseTSDContent.
private void parseTSDContent(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) {
CMSTimeStampedDataParser cmsTimeStampedDataParser = null;
EmbeddedDocumentExtractor edx = EmbeddedDocumentUtil.getEmbeddedDocumentExtractor(context);
if (edx.shouldParseEmbedded(metadata)) {
try {
cmsTimeStampedDataParser = new CMSTimeStampedDataParser(stream);
try (InputStream is = TikaInputStream.get(cmsTimeStampedDataParser.getContent())) {
edx.parseEmbedded(is, handler, metadata, false);
}
} catch (Exception ex) {
LOG.error("Error in TSDParser.parseTSDContent {}", ex.getMessage());
} finally {
this.closeCMSParser(cmsTimeStampedDataParser);
}
}
}
Aggregations