Read bytes into byte arrays taking into account that a call to
InputStream.read(byte[] b) may not fully populate the byte array.  The
return value must be checked to determine how many bytes were actually
read.
Merge pull request #1 from chrisrossi/read-bytes

Ensure byte arrays are read fully.