read Block
Reads and returns up to blockSize next bytes from the stream or an empty array if stream has ran out. Result array could has less size if there is less data remains in the stream.
Use hasNext to check is there more data in the stream.
Return
up to blockSize bytes from the stream
See also
Parameters
block Size
the maximum number of bytes read.