[
https://issues.apache.org/jira/browse/TIKA-3309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17294591#comment-17294591
]
Tim Allison commented on TIKA-3309:
-----------------------------------
+1
> 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)