Hi,

On Fri, Sep 10, 2010 at 7:19 PM,  <[email protected]> wrote:
> -        // We need (reliable!) mark support for type detection before parsing
> -        stream = new BufferedInputStream(stream);
> +        if(stream instanceof TikaInputStream || stream instanceof 
> BufferedInputStream) {
> +           // Input stream can be trusted for type detection
> +        } else {
> +           // We need (reliable!) mark support for type detection before 
> parsing
> +           stream = new BufferedInputStream(stream);
> +        }

Nice, good point! Even better, I'd simplify this to:

    // Ensure reliable mark support for type detection before parsing
    stream = TikaInputStream.get(stream);

BR,

Jukka Zitting

Reply via email to