Table of Contents

Interface IDataReader

Namespace
Windows.Storage.Streams
Assembly
Windows.Storage.Streams.dll

Provides read access to an input stream.

public interface IDataReader
Extension Methods

Properties

ByteOrder

Gets or sets the byte order of the data in the input stream.

ByteOrder ByteOrder { get; }

Property Value

ByteOrder

One of the enumeration values.

Remarks

nanoFramework doesn't this feature. ByteOrder is always LittleEndian.

InputStreamOptions

Gets or sets the read options for the input stream.

InputStreamOptions InputStreamOptions { get; set; }

Property Value

InputStreamOptions

One of the enumeration values.

UnconsumedBufferLength

Gets the size of the buffer that has not been read.

uint UnconsumedBufferLength { get; }

Property Value

uint

The size of the buffer that has not been read, in bytes.

UnicodeEncoding

Gets or sets the Unicode character encoding for the input stream.

UnicodeEncoding UnicodeEncoding { get; }

Property Value

UnicodeEncoding

One of the enumeration values.

Remarks

nanoFramework doesn't this feature. UnicodeEncoding is always Utf8.

Methods

DetachStream()

Detaches a stream that was previously attached to the reader.

IInputStream DetachStream()

Returns

IInputStream

The detached stream.

Load(uint)

Loads data from the input stream.

uint Load(uint count)

Parameters

count uint

The count of bytes to load into the intermediate buffer.

Returns

uint

The asynchronous operation.

ReadBoolean()

Reads a Boolean value from the input stream.

bool ReadBoolean()

Returns

bool

The value.

ReadBuffer(uint)

Reads a buffer from the input stream.

IBuffer ReadBuffer(uint length)

Parameters

length uint

The length of the buffer, in bytes.

Returns

IBuffer

The buffer.

ReadByte()

Reads a byte value from the input stream.

byte ReadByte()

Returns

byte

The value.

ReadBytes(byte[])

Reads an array of byte values from the input stream.

void ReadBytes(byte[] value)

Parameters

value byte[]

The array of values.

ReadDateTime()

Reads a date and time value from the input stream.

DateTime ReadDateTime()

Returns

DateTime

The value.

ReadDouble()

Reads a floating-point value from the input stream.

double ReadDouble()

Returns

double

The value.

ReadGuid()

Reads a GUID value from the input stream.

Guid ReadGuid()

Returns

Guid

The value.

ReadInt16()

Reads a 16-bit integer value from the input stream.

short ReadInt16()

Returns

short

The value.

ReadInt32()

Reads a 32-bit integer value from the input stream.

int ReadInt32()

Returns

int

The value.

ReadInt64()

Reads a 64-bit integer value from the input stream.

long ReadInt64()

Returns

long

The value.

ReadSingle()

Reads a floating-point value from the input stream.

float ReadSingle()

Returns

float

The value.

ReadString(uint)

Reads a string value from the input stream.

string ReadString(uint codeUnitCount)

Parameters

codeUnitCount uint

The length of the string.

Returns

string

The value.

ReadTimeSpan()

Reads a time interval from the input stream.

TimeSpan ReadTimeSpan()

Returns

TimeSpan

The value.

ReadUInt16()

Reads a 16-bit unsigned integer from the input stream.

ushort ReadUInt16()

Returns

ushort

The value.

ReadUInt32()

Reads a 32-bit unsigned integer from the input stream.

uint ReadUInt32()

Returns

uint

The value.

ReadUInt64()

Reads a 64-bit unsigned integer from the input stream.

ulong ReadUInt64()

Returns

ulong

The value.