You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2020/09/18 14:18:05 UTC

[tika] branch main updated: Modify TikaInputStream (#357)

This is an automated email from the ASF dual-hosted git repository.

tallison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git


The following commit(s) were added to refs/heads/main by this push:
     new 67d46a2  Modify TikaInputStream (#357)
67d46a2 is described below

commit 67d46a27cc533f3dc5d2f0201e2100ddd33eed07
Author: Lee <55...@users.noreply.github.com>
AuthorDate: Fri Sep 18 22:17:56 2020 +0800

    Modify TikaInputStream (#357)
    
    Update position and mark after use InputStream from tmp file.
---
 tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java b/tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java
index f451f33..38cdab7 100644
--- a/tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java
+++ b/tika-core/src/main/java/org/apache/tika/io/TikaInputStream.java
@@ -706,7 +706,10 @@ public class TikaInputStream extends TaggedInputStream {
                     }
                 };
 
+                // Update length to file size. Update position, mark
                 length = Files.size(path);
+                position = 0;
+                mark = -1;
             }
         }
         return path;