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

ASF GitHub Bot commented on TIKA-3309:
--------------------------------------

peterkronenberg opened a new pull request #408:
URL: https://github.com/apache/tika/pull/408


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add additional construtors for RereadableInputStream
> ----------------------------------------------------
>
>                 Key: TIKA-3309
>                 URL: https://issues.apache.org/jira/browse/TIKA-3309
>             Project: Tika
>          Issue Type: Improvement
>            Reporter: Peter Kronenberg
>            Priority: Major
>
> RereadableInputStream documents default values for 
> _readToEndOfStreamOnFirstRewind_ and _closeOriginalStreamOnClose_.  But in 
> fact, these values always need to be specified, since there is a single 
> constructor and all fields are required.
> I propose adding an additional constructor where both these fields default to 
> _true_
> {code:java}
> public RereadableInputStream(InputStream inputStream, int maxBytesInMemory) {
>         this(inputStream, maxBytesInMemory, true, true);
>     }
> {code}
> __In addition, it would be nice to have a default value for 
> _maxBytesInMemory_.  Users can always specify a value if the default doesn't 
> suit them.  I propose a value of 500Mb, which seems like a reasonable about 
> of memory that any system these days could accommodate for a relatively 
> short-lived object.
> So an additional constructor would be
> {code:java}
>    public RereadableInputStream(InputStream inputStream) {
>         this(inputStream, 512*1024*1024, true, true);
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to