What's wrong with the following code?
public void fillByteArray(InputStream s, byte[] b, int offset, Integer numReads, int readAmount){
while (numReads > 0){
s.read(b, offset, readAmount);
offset += readAmount;
numReads--;
}
}