Fixed thinko in ByteArrayInputStream

This commit is contained in:
Eric Scharff 2007-10-30 16:52:24 -06:00
parent 6afb667e03
commit 2fd2df53fd

View File

@ -20,7 +20,7 @@ public class ByteArrayInputStream extends InputStream {
} }
public int read(byte[] buffer, int offset, int bufferLength) { public int read(byte[] buffer, int offset, int bufferLength) {
if (position < length) { if (position >= length) {
return -1; return -1;
} }
int remaining = length-position; int remaining = length-position;