Implement read(byte[]) with read() for consistency

Previously multiple calls to read() returned different results than a
single call to read(byte[]).