[
https://issues.apache.org/jira/browse/OAK-956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13828480#comment-13828480
]
Alexander Klimetschek commented on OAK-956:
-------------------------------------------
One thing to note: even BufferedInputStream might require multiple {{read()}}
calls, in case the number of bytes is larger than the buffer. You are save if
you never ask for more. Sling's
[StreamRendererServlet|http://svn.apache.org/repos/asf/sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java]
does that, it creates the BIS with a buffer size of IO_BUFFER_SIZE and copies
bytes in exactly this size over.
The test case properly covers that and creates a BIS with a size that is larger
than what is read.
> SegmentStream doesn't implement the method available()
> ------------------------------------------------------
>
> Key: OAK-956
> URL: https://issues.apache.org/jira/browse/OAK-956
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Reporter: Antonio Sanso
>
> org.apache.jackrabbit.oak.plugins.segment.SegmentStream doesn't implement
> the method available()
> {code}
> Value.getStream().available()
> {code}
> will always return 0
--
This message was sent by Atlassian JIRA
(v6.1#6144)