Re: [BUG] InputStream.readNBytes doesn't correctly check for EOF

2020-12-22 Thread Philippe Marschall
On 20.12.20 19:15, Philippe Marschall wrote: On 20.12.20 18:47, Rob Spoor wrote: ... That "> 0" is incorrect here; it's allowed to return 0 before EOF I don't think the method is allowed to return 0 before EOF. To quote from the method Javadoc. > This method blocks until input data is

Re: [BUG] InputStream.readNBytes doesn't correctly check for EOF

2020-12-21 Thread Rob Spoor
On 20/12/2020 19:15, Philippe Marschall wrote: On 20.12.20 18:47, Rob Spoor wrote: ... That "> 0" is incorrect here; it's allowed to return 0 before EOF I don't think the method is allowed to return 0 before EOF. To quote from the method Javadoc. > This method blocks until input data is a

Re: [BUG] InputStream.readNBytes doesn't correctly check for EOF

2020-12-20 Thread Philippe Marschall
On 20.12.20 18:47, Rob Spoor wrote: ... That "> 0" is incorrect here; it's allowed to return 0 before EOF I don't think the method is allowed to return 0 before EOF. To quote from the method Javadoc. > This method blocks until input data is available, end of file is detected, or an excepti

[BUG] InputStream.readNBytes doesn't correctly check for EOF

2020-12-20 Thread Rob Spoor
According to the documentation of InputStream.readNBytes: Reads up to a specified number of bytes from the input stream. This method blocks until the requested number of bytes have been read, end of stream is detected, or an exception is thrown. This method does not close the input stream