IDataReader IDataReader IDataReader IDataReader Interface

Definition

Provides read access to an input stream.

public interface IDataReaderpublic interface IDataReaderPublic Interface IDataReaderpublic interface IDataReader
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

ByteOrder ByteOrder ByteOrder ByteOrder

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

public ByteOrder ByteOrder { get; set; }public ByteOrder ByteOrder { get; set; }Public ReadWrite Property ByteOrder As ByteOrderpublic ByteOrder ByteOrder { get; set; }
Value
ByteOrder ByteOrder ByteOrder ByteOrder

One of the enumeration values.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

InputStreamOptions InputStreamOptions InputStreamOptions InputStreamOptions

Gets or sets the read options for the input stream.

public InputStreamOptions InputStreamOptions { get; set; }public InputStreamOptions InputStreamOptions { get; set; }Public ReadWrite Property InputStreamOptions As InputStreamOptionspublic InputStreamOptions InputStreamOptions { get; set; }
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

UnconsumedBufferLength UnconsumedBufferLength UnconsumedBufferLength UnconsumedBufferLength

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

public uint UnconsumedBufferLength { get; }public uint UnconsumedBufferLength { get; }Public ReadOnly Property UnconsumedBufferLength As uintpublic uint UnconsumedBufferLength { get; }
Value
uint uint uint uint

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

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

UnicodeEncoding UnicodeEncoding UnicodeEncoding UnicodeEncoding

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

public UnicodeEncoding UnicodeEncoding { get; set; }public UnicodeEncoding UnicodeEncoding { get; set; }Public ReadWrite Property UnicodeEncoding As UnicodeEncodingpublic UnicodeEncoding UnicodeEncoding { get; set; }
Value
UnicodeEncoding UnicodeEncoding UnicodeEncoding UnicodeEncoding

One of the enumeration values.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Methods

DetachBuffer() DetachBuffer() DetachBuffer() DetachBuffer()

Detaches a buffer that was previously attached to the reader.

public IBuffer DetachBuffer()public IBuffer DetachBuffer()Public Function DetachBuffer() As IBufferpublic IBuffer DetachBuffer()
Returns

The detached buffer.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

DetachStream() DetachStream() DetachStream() DetachStream()

Detaches a stream that was previously attached to the reader.

public IInputStream DetachStream()public IInputStream DetachStream()Public Function DetachStream() As IInputStreampublic IInputStream DetachStream()
Returns
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

LoadAsync(UInt32) LoadAsync(UInt32) LoadAsync(UInt32) LoadAsync(UInt32)

Loads data from the input stream.

public DataReaderLoadOperation LoadAsync(UInt32 count)public DataReaderLoadOperation LoadAsync(UInt32 count)Public Function LoadAsync(count As UInt32) As DataReaderLoadOperationpublic DataReaderLoadOperation LoadAsync(UInt32 count)
Parameters
count
System.UInt32 System.UInt32 System.UInt32 System.UInt32

The count of bytes to load into the intermediate buffer.

Returns
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadBoolean() ReadBoolean() ReadBoolean() ReadBoolean()

Reads a Boolean value from the input stream.

public bool ReadBoolean()public bool ReadBoolean()Public Function ReadBoolean() As boolpublic bool ReadBoolean()
Returns
bool bool bool bool

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadBuffer(UInt32) ReadBuffer(UInt32) ReadBuffer(UInt32) ReadBuffer(UInt32)

Reads a buffer from the input stream.

public IBuffer ReadBuffer(UInt32 length)public IBuffer ReadBuffer(UInt32 length)Public Function ReadBuffer(length As UInt32) As IBufferpublic IBuffer ReadBuffer(UInt32 length)
Parameters
length
System.UInt32 System.UInt32 System.UInt32 System.UInt32

The length of the buffer, in bytes.

Returns
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadByte() ReadByte() ReadByte() ReadByte()

Reads a byte value from the input stream.

public byte ReadByte()public byte ReadByte()Public Function ReadByte() As bytepublic byte ReadByte()
Returns
byte byte byte byte

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadBytes(Byte[]) ReadBytes(Byte[]) ReadBytes(Byte[]) ReadBytes(Byte[])

Reads an array of byte values from the input stream.

public void ReadBytes(Byte[] value)public void ReadBytes(Byte[] value)Public Function ReadBytes(value As Byte[]) As voidpublic void ReadBytes(Byte[] value)
Parameters
value
System.Byte[] System.Byte[] System.Byte[] System.Byte[]

The array of values.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadDateTime() ReadDateTime() ReadDateTime() ReadDateTime()

Reads a date and time value from the input stream.

public DateTime ReadDateTime()public DateTimeOffset ReadDateTime()Public Function ReadDateTime() As DateTimeOffsetpublic DateTime ReadDateTime()
Returns
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadDouble() ReadDouble() ReadDouble() ReadDouble()

Reads a floating-point value from the input stream.

public double ReadDouble()public double ReadDouble()Public Function ReadDouble() As doublepublic double ReadDouble()
Returns
double double double double

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadGuid() ReadGuid() ReadGuid() ReadGuid()

Reads a GUID value from the input stream.

public Guid ReadGuid()public Guid ReadGuid()Public Function ReadGuid() As Guidpublic Guid ReadGuid()
Returns
System.Guid System.Guid System.Guid System.Guid

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadInt16() ReadInt16() ReadInt16() ReadInt16()

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

public short ReadInt16()public short ReadInt16()Public Function ReadInt16() As shortpublic short ReadInt16()
Returns
short short short short

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadInt32() ReadInt32() ReadInt32() ReadInt32()

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

public int ReadInt32()public int ReadInt32()Public Function ReadInt32() As intpublic int ReadInt32()
Returns
int int int int

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadInt64() ReadInt64() ReadInt64() ReadInt64()

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

public long ReadInt64()public long ReadInt64()Public Function ReadInt64() As longpublic long ReadInt64()
Returns
long long long long

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadSingle() ReadSingle() ReadSingle() ReadSingle()

Reads a floating-point value from the input stream.

public float ReadSingle()public float ReadSingle()Public Function ReadSingle() As floatpublic float ReadSingle()
Returns
float float float float

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadString(UInt32) ReadString(UInt32) ReadString(UInt32) ReadString(UInt32)

Reads a string value from the input stream.

public string ReadString(UInt32 codeUnitCount)public string ReadString(UInt32 codeUnitCount)Public Function ReadString(codeUnitCount As UInt32) As stringpublic string ReadString(UInt32 codeUnitCount)
Parameters
codeUnitCount
System.UInt32 System.UInt32 System.UInt32 System.UInt32

The length of the string.

Returns
string string string string

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadTimeSpan() ReadTimeSpan() ReadTimeSpan() ReadTimeSpan()

Reads a time interval from the input stream.

public TimeSpan ReadTimeSpan()public TimeSpan ReadTimeSpan()Public Function ReadTimeSpan() As TimeSpanpublic TimeSpan ReadTimeSpan()
Returns
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadUInt16() ReadUInt16() ReadUInt16() ReadUInt16()

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

public ushort ReadUInt16()public ushort ReadUInt16()Public Function ReadUInt16() As ushortpublic ushort ReadUInt16()
Returns
ushort ushort ushort ushort

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadUInt32() ReadUInt32() ReadUInt32() ReadUInt32()

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

public uint ReadUInt32()public uint ReadUInt32()Public Function ReadUInt32() As uintpublic uint ReadUInt32()
Returns
uint uint uint uint

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ReadUInt64() ReadUInt64() ReadUInt64() ReadUInt64()

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

public ulong ReadUInt64()public ulong ReadUInt64()Public Function ReadUInt64() As ulongpublic ulong ReadUInt64()
Returns
ulong ulong ulong ulong

The value.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)