If a required number of bytes is passed as an option, this will wait for
the underlying stream to supply that number of bytes, throwing an
UnexpectedEOFError if the stream closes before this happens.
If no required number of bytes is passed, this will return null if the
underlying stream closes before supplying any bytes.
Read bytes from the stream.
If a required number of bytes is passed as an option, this will wait for the underlying stream to supply that number of bytes, throwing an
UnexpectedEOFError
if the stream closes before this happens.If no required number of bytes is passed, this will return
null
if the underlying stream closes before supplying any bytes.