InputStream should be allowed to return 0 bytes read
See original GitHub issue_loadMore()
should handle read() returning 0 bytes here https://github.com/FasterXML/jackson-core/blob/master/src/main/java/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java#L193
read() method doesn’t guarantee a non-zero number of bytes are read https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html#read(byte[], int, int)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
What 0 returned by InputStream.read(byte[]) means? How to ...
If the length of b is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read...
Read more >InputStream.available() returns 0 after securing a plain Socket ...
InputStream.available() on an SSL socket always returns zero because it can't tell how much data is available to read without blocking unless it ......
Read more >StorageInputStream Class - Microsoft Learn
Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to...
Read more >InputStream - Android Developers
PipedInputStream, A piped input stream should be connected to a piped output ... If the length of b is zero, then no bytes...
Read more >InputStream (GNU Classpath 0.95 Documentation)
This method reads an unsigned byte from the input stream and returns it as an int in the range of 0-255. This method...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jbalint please, do not waste our time - nobody will burn CPUs on returned zeroes!
@jbalint Thank you for following up with Undertow if it returns 0 even if buffer would have space. That does not sound like correct behavior, given practical difficults in taking other actions.