Read data from the stream.
Buffer where to copy the read data and sized to the amount of bytes to be read.
The number of bytes actually read, or -1 on error.
See Implementation
Read data from the stream.