<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
I think the idea is to treat an IOException thrown by any but the first invocation of readBytes() as equivalent to end-of-file such as described for <a href="https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/io/InputStream.html#read(byte%5B%5D,int,int)" class="">InputStream::read(byte[],int,int)</a> with
 respect to its invocation of <a href="https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/io/InputStream.html#read()" class="">InputStream::read()</a>.<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jul 24, 2023, at 8:33 AM, Bernd <<a href="mailto:ecki@zusammenkunft.net" class="">ecki@zusammenkunft.net</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">If
 you return the short buffer (on IOException), does it need to cache the pending exception or can you just rely on the next read hitting that underlying exception again? (Is there an actual guarantee somewhere that the read position is not altered on IOExceptions
 or that you always get lending bytes before this report? (If so, does the native code do that as well?)</span></div>
</blockquote>
</div>
<br class="">
</body>
</html>