@Test public void testExcelXLSB() throws Exception { Detector detector = new DefaultDetector(); Metadata m = new Metadata(); m.add(TikaCoreProperties.RESOURCE_NAME_KEY, "excel.xlsb"); MediaType type; try (InputStream input = ExcelParserTest.class.getResourceAsStream( "/test-documents/testEXCEL.xlsb")) { type = detector.detect(input, m); assertEquals("application/vnd.ms-excel.sheet.binary.macroenabled.12", type.toString()); } assertEquals(false, (new OfficeParser()).getSupportedTypes(new ParseContext()).contains(type)); assertTrue((new OOXMLParser()).getSupportedTypes(new ParseContext()).contains(type)); ParseContext context = new ParseContext(); context.set(Locale.class, Locale.US); String content = getText("testEXCEL.xlsb", new Metadata(), context); assertContains("This is an example spreadsheet", content); }
public Set<MediaType> getSupportedTypes(ParseContext context) { return SUPPORTED_TYPES; }
OOXMLParser extends AbstractOfficeParser { public Set<MediaType> getSupportedTypes(ParseContext context) { return SUPPORTED_TYPES; } }
OOXMLParser extends AbstractOfficeParser { public Set<MediaType> getSupportedTypes(ParseContext context) { return SUPPORTED_TYPES; }  }
OOXMLParser extends AbstractOfficeParser { public Set<MediaType> getSupportedTypes(ParseContext context) { return SUPPORTED_TYPES; }  Set<MediaType> getSupportedTypes(ParseContext context); void parse(
            InputStream stream, ContentHandler handler,
            Metadata metadata, ParseContext context); }
OOXMLParser extends AbstractOfficeParser { public Set<MediaType> getSupportedTypes(ParseContext context) { return SUPPORTED_TYPES; }  Set<MediaType> getSupportedTypes(ParseContext context); void parse(
            InputStream stream, ContentHandler handler,
            Metadata metadata, ParseContext context);  }