documentInputStream = poifs.createDocumentInputStream("Workbook");
final HSSFRequest req = new HSSFRequest();
final MissingRecordAwareHSSFListener missingRecordAwareHSSFListener = new MissingRecordAwareHSSFListener(new HSSFListenerImpl(this));
formatListener = new FormatTrackingHSSFListener(missingRecordAwareHSSFListener);
req.addListenerForAllRecords(formatListener);
final HSSFEventFactory factory = new HSSFEventFactory();
if (objectMapper == null) {
initJsonFactoryAndObjectMapper();
}
new Thread(new Runnable() {
@Override
public void run() {
try {
factory.processEvents(req, documentInputStream);
} catch (final ReadCompletedException e) {
SupportLogger.LOGGER.tracef("Completed reading %s%n", resource);
}
}
}).start();