jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r656655 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/TempFileInputStream.java
Date Thu, 15 May 2008 13:32:57 GMT
Author: thomasm
Date: Thu May 15 06:32:57 2008
New Revision: 656655

URL: http://svn.apache.org/viewvc?rev=656655&view=rev
Log:
JCR-1602: DbDatastore: Problems indexing pdf file

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/TempFileInputStream.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/TempFileInputStream.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/TempFileInputStream.java?rev=656655&r1=656654&r2=656655&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/TempFileInputStream.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/TempFileInputStream.java
Thu May 15 06:32:57 2008
@@ -58,7 +58,7 @@
      *
      * @param file the temporary file
      */
-    TempFileInputStream(File file) throws FileNotFoundException {
+    public TempFileInputStream(File file) throws FileNotFoundException {
         this.file = file;
         in = new BufferedInputStream(new FileInputStream(file));
     }
@@ -99,14 +99,23 @@
     }
 
     public int read(byte[] b, int off, int len) throws IOException {
+        if (closed) {
+            return -1;
+        }
         return closeIfEOF(in.read(b, off, len));
     }
 
     public int read(byte[] b) throws IOException {
+        if (closed) {
+            return -1;
+        }
         return closeIfEOF(in.read(b));
     }
 
     public int read() throws IOException {
+        if (closed) {
+            return -1;
+        }
         return closeIfEOF(in.read());
     }
 



Mime
View raw message