tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mattmann, Chris A (3980)" <chris.a.mattm...@jpl.nasa.gov>
Subject Re: TIKA-1164
Date Mon, 04 Jul 2016 15:45:41 GMT
Hi Samuel I am forwarding your email to dev@tika.a.o and moving
dev-owner@t.a.o to BCC.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Chief Architect
Instrument Software and Science Data Systems Section (398)
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 168-519, Mailstop: 168-527
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Director, Information Retrieval and Data Science Group (IRDS)
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
WWW: http://irds.usc.edu/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++










On 7/4/16, 8:41 AM, "scatherine.ext@gouv.mc" <scatherine.ext@gouv.mc> wrote:

>Hi,
>
>I use Tika to detect MediaType and i have the same problem than the JIRA TIKA-1164
>https://issues.apache.org/jira/browse/TIKA-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

>But I use the version 1.13. How can I solve this problem, please ?
>
>MediaType mediaType=null;
>        Metadata md =
>new Metadata();
>        md.set(Metadata.RESOURCE_NAME_KEY,
>fileName);
>        Detector detector = TikaConfig.getDefaultConfig().getDetector();
>
>        try {
>            mediaType =
>detector.detect(TikaInputStream.get(content),
>md);
>
>        } catch (IOException
>e) {
>           
>            mediaType =
>null;
>        }
>
>The contentsize (content.available()) change between before and after the detect call.
>
>Regards,
>
>Samuel Catherine
>
>
Mime
View raw message