@Test public void testSimple() throws Exception { Metadata metadata = new Metadata(); InputStream stream = getClass().getResourceAsStream("/test-documents/IMG_1034.heic"); parser.parse(stream, new DefaultHandler(), metadata, new ParseContext()); assertEquals("heic", metadata.get("Major Brand")); assertEquals("512 pixels", metadata.get("Width")); assertEquals("512 pixels", metadata.get("Height")); assertEquals("image/heic", metadata.get(Metadata.CONTENT_TYPE)); IOUtils.closeQuietly(stream); }
@Override public void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { new ImageMetadataExtractor(metadata).parseHeif(stream); XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata); xhtml.startDocument(); xhtml.endDocument(); }
HeifParser extends AbstractParser { @Override public void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { new ImageMetadataExtractor(metadata).parseHeif(stream); XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata); xhtml.startDocument(); xhtml.endDocument(); } }
HeifParser extends AbstractParser { @Override public void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { new ImageMetadataExtractor(metadata).parseHeif(stream); XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata); xhtml.startDocument(); xhtml.endDocument(); }  }
HeifParser extends AbstractParser { @Override public void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { new ImageMetadataExtractor(metadata).parseHeif(stream); XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata); xhtml.startDocument(); xhtml.endDocument(); }  @Override Set<MediaType> getSupportedTypes(ParseContext context); @Override void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context); }
HeifParser extends AbstractParser { @Override public void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException { new ImageMetadataExtractor(metadata).parseHeif(stream); XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata); xhtml.startDocument(); xhtml.endDocument(); }  @Override Set<MediaType> getSupportedTypes(ParseContext context); @Override void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context);  }