[jira] Created: (TIKA-52) RereadableInputStream needs to support not closing the input stream it wraps.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (TIKA-52) RereadableInputStream needs to support not closing the input stream it wraps.

Cristian Vat (Jira)
RereadableInputStream needs to support not closing the input stream it wraps.
-----------------------------------------------------------------------------

                 Key: TIKA-52
                 URL: https://issues.apache.org/jira/browse/TIKA-52
             Project: Tika
          Issue Type: Improvement
          Components: general
    Affects Versions: 0.1-incubator
            Reporter: Keith R. Bennett
             Fix For: 0.1-incubator


The MSParser currently uses the RereadableInputStream to reread a stream.  The Parser architecture requires that parser implementations do not close the stream, but instead leave that task to the parser's caller.  We need to add the ability to *not* close the stream to RereadableInputStream, and use that option in MSParser.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (TIKA-52) RereadableInputStream needs to support not closing the input stream it wraps.

Cristian Vat (Jira)

     [ https://issues.apache.org/jira/browse/TIKA-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith R. Bennett updated TIKA-52:
---------------------------------

    Attachment: tika52.patch

This patch adds to RereadableInputStream the option of specifying whether or not to close the original input stream when close() is called.  Also, a convenience constructor that is currently not useful was removed.

MSParser is modified so that its input stream is not closed.

Unit tests were added to verify that the new behavior works correctly.


> RereadableInputStream needs to support not closing the input stream it wraps.
> -----------------------------------------------------------------------------
>
>                 Key: TIKA-52
>                 URL: https://issues.apache.org/jira/browse/TIKA-52
>             Project: Tika
>          Issue Type: Improvement
>          Components: general
>    Affects Versions: 0.1-incubator
>            Reporter: Keith R. Bennett
>             Fix For: 0.1-incubator
>
>         Attachments: tika52.patch
>
>
> The MSParser currently uses the RereadableInputStream to reread a stream.  The Parser architecture requires that parser implementations do not close the stream, but instead leave that task to the parser's caller.  We need to add the ability to *not* close the stream to RereadableInputStream, and use that option in MSParser.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (TIKA-52) RereadableInputStream needs to support not closing the input stream it wraps.

Cristian Vat (Jira)
In reply to this post by Cristian Vat (Jira)

     [ https://issues.apache.org/jira/browse/TIKA-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Delacretaz resolved TIKA-52.
-------------------------------------

    Resolution: Fixed

patch applied in revision 584054, thanks!

> RereadableInputStream needs to support not closing the input stream it wraps.
> -----------------------------------------------------------------------------
>
>                 Key: TIKA-52
>                 URL: https://issues.apache.org/jira/browse/TIKA-52
>             Project: Tika
>          Issue Type: Improvement
>          Components: general
>    Affects Versions: 0.1-incubator
>            Reporter: Keith R. Bennett
>             Fix For: 0.1-incubator
>
>         Attachments: tika52.patch
>
>
> The MSParser currently uses the RereadableInputStream to reread a stream.  The Parser architecture requires that parser implementations do not close the stream, but instead leave that task to the parser's caller.  We need to add the ability to *not* close the stream to RereadableInputStream, and use that option in MSParser.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.