Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -526,6 +526,10 @@ private boolean isEof() throws IOException {
// compatible behavior.
byte[] bytes = new byte[16];
int read = bufferedStream.read(bytes, 0, bytes.length);

// We are already at EOF.
if (read == -1) return true;

bufferedStream.unread(bytes, 0, read);

return bufferedStream.available() == 0;

0 comments on commit 83098f6

Please sign in to comment.