Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 50590 invoked from network); 15 May 2008 13:33:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 May 2008 13:33:20 -0000 Received: (qmail 90776 invoked by uid 500); 15 May 2008 13:33:22 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 90690 invoked by uid 500); 15 May 2008 13:33:22 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 90681 invoked by uid 99); 15 May 2008 13:33:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 06:33:22 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 13:32:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 699D12388A59; Thu, 15 May 2008 06:32:57 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@jackrabbit.apache.org From: thomasm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080515133257.699D12388A59@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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()); }