question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InputStream should be allowed to return 0 bytes read

See original GitHub issue

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
plokhotnyukcommented, Oct 28, 2019

@jbalint please, do not waste our time - nobody will burn CPUs on returned zeroes!

0reactions
cowtowncodercommented, Nov 4, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found