PeterO.IReader
## PeterO.IReader
public interface IReader : PeterO.IByteReader
A generic interface for reading bytes of data from a data source.
Member Summary
[Read(byte[], int, int)](#Read_byte_int_int)
- Reads a portion of a byte array from the data source.
int Read( byte[] bytes, int offset, int length);
Reads a portion of a byte array from the data source.
Parameters:
-
bytes: A byte array which will contain the data that was read from the data source.
-
offset: An index starting at 0 showing where the desired portion of bytes begins.
-
length: The number of elements in the desired portion of bytes (but not more than bytes ‘s length).
Return Value:
The number of bytes read from the data source. Can be less than length if the end of the stream was reached.
Exceptions:
-
System.ArgumentNullException: Should be thrown if the parameter bytes is null.
-
System.ArgumentException: Should be thrown if either offset or length is less than 0 or greater than bytes ‘s length, or bytes ‘s length minus offset is less than length .