Skip to content

Commit

Permalink
Update ByteBufferStream read() to return byte values from 0-255 or -1…
Browse files Browse the repository at this point in the history
… if EOF reached.

PiperOrigin-RevId: 269596827
  • Loading branch information
sjudd authored and glide-copybara-robot committed Sep 17, 2019
1 parent e021f6b commit 24f9c28
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public int read() {
if (!byteBuffer.hasRemaining()) {
return -1;
}
return byteBuffer.get();
return byteBuffer.get() & 0xFF;
}

@Override
Expand Down

0 comments on commit 24f9c28

Please sign in to comment.