This interface represents the most simple input stream, and mirrors how typical file io is performed. More about the semantics of the interface can be read about in the
overview of IO.
1 Read_0
This function reads bytes from the input stream, retrieving them in consecutive order, and stores them in the buffer. If the memory between Buffer,(char*)Buffer+BytesToRead is not writable so is the behaviour undefined.
The return value is the amount of bytes that where read, meaning that Buffer,(Char*)Buffer+(returned value) has the new bytes that were read from the stream. A return value less than BytesToRead means that no more bytes are left in the stream, and subsequent calls will always return 0, and leave Buffer unmodified.
This function will never throw an exception.
1.1 Buffer
The buffer where the output is stored.
1.2 BytesToRead
The max amount of bytes to read. A return value less than this value indicates the the stream has no more bytes left to read.
1.3 ReturnValue
The amount of bytes that were read from the stream.