[]
        
(Showing Draft Content)

C1.Util.DX.DataStream.ReadRange

ReadRange Method

ReadRange<T>(int)

Reads an array of values from the current stream, and advances the current position within this stream by the number of bytes written.

Declaration
public T[] ReadRange<T>(int count) where T : struct
Parameters
Type Name Description
int count
Returns
Type Description
T[]

An array of values that was read from the current stream.

Type Parameters
Name Description
T

The type of the values to be read from the stream.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

ReadRange<T>(T[], int, int)

Reads a sequence of elements from the current stream into a target buffer and advances the position within the stream by the number of bytes read.

Declaration
public int ReadRange<T>(T[] buffer, int offset, int count) where T : struct
Parameters
Type Name Description
T[] buffer

An array of values to be read from the stream.

int offset

The zero-based byte offset in buffer at which to begin storing the data read from the current stream.

int count

The number of values to be read from the current stream.

Returns
Type Description
int

The number of bytes read from the stream.

Type Parameters
Name Description
T
Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Exceptions
Type Condition
NotSupportedException

This stream does not support reading.