[ 
https://issues.apache.org/jira/browse/TIKA-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620217#action_12620217
 ] 

Jukka Zitting commented on TIKA-149:
------------------------------------

You can use the CloseShieldInputStream wrapper from commons-io to prevent the 
zis stream from being closed. Also, note that the general contract of the 
parse() method is that the parser should _not_ close the stream.

> In Tika what is the preferred approach for setting instance variables like 
> this, via constructors or getters/setters.

I'd use getter/setter methods, with some reasonable default value like in this 
case the AutoDetectParser.

[1] 
http://commons.apache.org/io/api-release/org/apache/commons/io/input/CloseShieldInputStream.html

> Parser for zip files
> --------------------
>
>                 Key: TIKA-149
>                 URL: https://issues.apache.org/jira/browse/TIKA-149
>             Project: Tika
>          Issue Type: New Feature
>          Components: parser
>            Reporter: Jukka Zitting
>         Attachments: TIKA-149-II.diff, TIKA-149.patch
>
>
> Tika should be able to parse zip files. The resulting XHTML document should 
> be something like this:
> <xhtml>
>   <head>...</head>
>   <body>
>     <div class="file">
>         <h1>path/to/file/inside/the/zip</h1>
>         ... (parsed contents of the file)
>     </div>
>     ...
>   </body>
> </xhtml>

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

Reply via email to