[
https://issues.apache.org/jira/browse/TIKA-3309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17296652#comment-17296652
]
Hudson commented on TIKA-3309:
------------------------------
UNSTABLE: Integrated in Jenkins build Tika » tika-main-jdk8 #166 (See
[https://ci-builds.apache.org/job/Tika/job/tika-main-jdk8/166/])
TIKA-3309 Add convenience constructors to RereadableInputStream (#408) (github:
[https://github.com/apache/tika/commit/e47f625233a056a27bd7e03be0c4a8da98828cb2])
* (edit)
tika-core/src/main/java/org/apache/tika/utils/RereadableInputStream.java
> 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)