final InputStream is = new ByteArrayInputStream(binary); Metadata md = new MetaData(); // Need to add filename to metadata, since office docs header elements are ambiguous and Tika determines the exact minetype by looking at the file extension md.add(Metadata.RESOURCE_NAME_KEY, filename); String mimetype = new DefaultDetector(MimeTypes.getDefaultMimeTypes()).detect(is, md).toString();
Tika Autodetect Parser
Posted on
by Kim
Subscribe to:
Post Comments (Atom)
0 Responses to "Tika Autodetect Parser":
Post a Comment