[ 
https://issues.apache.org/jira/browse/PDFBOX-5111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17291454#comment-17291454
 ] 

ASF subversion and git services commented on PDFBOX-5111:
---------------------------------------------------------

Commit 1886946 from [email protected] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1886946 ]

PDFBOX-5111: InputStream.available isn't reliable use read() instead to 
determine if more data is available

> Premature EOF in RandomAccessReadBuffer using an InputStream
> ------------------------------------------------------------
>
>                 Key: PDFBOX-5111
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5111
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>             Fix For: 3.0.0 PDFBox
>
>
> There are some strange differences in the test results without changing any 
> code, e.g. org.apache.pdfbox.pdmodel.font.PDFontTest.testPDFox5048()
> It looks like we can't rely on InputStream.available when reading a pdf from 
> a stream (based on an URL) using RandomAccessReadBuffer. According to the 
> javadoc ofInputStream.available the behaviour can be different for different 
> implementations. In our case it returns 0 and PDFBox doesn't read any more 
> data which leads to an incomplete file.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to