Hi,

On Thu, Apr 7, 2011 at 9:52 PM, Mark <[email protected]> wrote:
> I have a InputStream to an unknown file and would like to extract text from 
> it -
> using ParseUtils.getStringContent(java.io.InputStream stream, TikaConfig 
> config,
> java.lang.String mimeType). Which mimeType should I use?

Please use the org.apache.tika.Tika facade class instead of the old
ParseUtils class.

The code to parse an unknown file or an input stream with the Tika
facade is simply:

    String text = new Tika().parseToString(file);

or

    String text = new Tika().parseToString(stream);

See [1] for the details.

[1] http://tika.apache.org/0.9/api/org/apache/tika/Tika.html

BR,

Jukka Zitting

Reply via email to