[ https://issues.apache.org/jira/browse/NIFI-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14630012#comment-14630012 ]
Dan Bress commented on NIFI-715: -------------------------------- I also got hung up by this issue today. > InputStreamCallback InputStream reporting more bytes available than actually > readable > ------------------------------------------------------------------------------------- > > Key: NIFI-715 > URL: https://issues.apache.org/jira/browse/NIFI-715 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework > Affects Versions: 0.1.0 > Environment: OS X, Windows, Linux > Reporter: Adam Moreland > Priority: Minor > > When reading off of the InputStream within an InputStreamCallback, the > InputStream appears to report the bytes available in the content claim from > the start of the current flowFile through the end of the content claim. > As a basic test, I ran three files (sizes 38 bytes, 93 bytes, and 20 bytes) > through a GetFile processor followed by a basic processor that reads the > flowFile and outputs the in.available() value, reads until it comes to the > end of the file and outputs the number of bytes read. The output is as > follows: > 2015-06-22 20:23:19,447 INFO [Timer-Driven Process Thread-10] > test.testprocessor.TestProcessor > TestProcessor[id=386616eb-5ebc-4da9-8365-3b32fc539407] Bytes available: 151 > 2015-06-22 20:23:19,447 INFO [Timer-Driven Process Thread-10] > test.testprocessor.TestProcessor > TestProcessor[id=386616eb-5ebc-4da9-8365-3b32fc539407] Bytes read: 38 > 2015-06-22 20:23:19,448 INFO [Timer-Driven Process Thread-8] > test.testprocessor.TestProcessor > TestProcessor[id=386616eb-5ebc-4da9-8365-3b32fc539407] Bytes available: 113 > 2015-06-22 20:23:19,449 INFO [Timer-Driven Process Thread-8] > test.testprocessor.TestProcessor > TestProcessor[id=386616eb-5ebc-4da9-8365-3b32fc539407] Bytes read: 93 > 2015-06-22 20:23:19,449 INFO [Timer-Driven Process Thread-8] > test.testprocessor.TestProcessor > TestProcessor[id=386616eb-5ebc-4da9-8365-3b32fc539407] Bytes available: 20 > 2015-06-22 20:23:19,449 INFO [Timer-Driven Process Thread-8] > test.testprocessor.TestProcessor > TestProcessor[id=386616eb-5ebc-4da9-8365-3b32fc539407] Bytes read: 20 > Also affects the InputStream within a StreamCallback. -- This message was sent by Atlassian JIRA (v6.3.4#6332)