Interface IDataReader
Provides read access to an input stream.
Namespace: Windows.Storage.Streams
Assembly: Windows.Storage.Streams.dll
Syntax
public interface IDataReader
Properties
ByteOrder
Gets or sets the byte order of the data in the input stream.
Declaration
ByteOrder ByteOrder { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
InputStreamOptions InputStreamOptions { get; set; }
Property Value
Type | Description |
---|---|
InputStreamOptions | One of the enumeration values. |
UnconsumedBufferLength
Gets the size of the buffer that has not been read.
Declaration
uint UnconsumedBufferLength { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
UnicodeEncoding UnicodeEncoding { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
IInputStream DetachStream()
Returns
Type | Description |
---|---|
IInputStream | The detached stream. |
Load(uint)
Loads data from the input stream.
Declaration
uint Load(uint count)
Parameters
Type | Name | Description |
---|---|---|
uint | count | The count of bytes to load into the intermediate buffer. |
Returns
Type | Description |
---|---|
uint | The asynchronous operation. |
ReadBoolean()
Reads a Boolean value from the input stream.
Declaration
bool ReadBoolean()
Returns
Type | Description |
---|---|
bool | The value. |
ReadBuffer(uint)
Reads a buffer from the input stream.
Declaration
IBuffer ReadBuffer(uint length)
Parameters
Type | Name | Description |
---|---|---|
uint | length | The length of the buffer, in bytes. |
Returns
Type | Description |
---|---|
IBuffer | The buffer. |
ReadByte()
Reads a byte value from the input stream.
Declaration
byte ReadByte()
Returns
Type | Description |
---|---|
byte | The value. |
ReadBytes(byte[])
Reads an array of byte values from the input stream.
Declaration
void ReadBytes(byte[] value)
Parameters
Type | Name | Description |
---|---|---|
byte[] | value | The array of values. |
ReadDateTime()
Reads a date and time value from the input stream.
Declaration
DateTime ReadDateTime()
Returns
Type | Description |
---|---|
DateTime | The value. |
ReadDouble()
Reads a floating-point value from the input stream.
Declaration
double ReadDouble()
Returns
Type | Description |
---|---|
double | The value. |
ReadGuid()
Reads a GUID value from the input stream.
Declaration
Guid ReadGuid()
Returns
Type | Description |
---|---|
Guid | The value. |
ReadInt16()
Reads a 16-bit integer value from the input stream.
Declaration
short ReadInt16()
Returns
Type | Description |
---|---|
short | The value. |
ReadInt32()
Reads a 32-bit integer value from the input stream.
Declaration
int ReadInt32()
Returns
Type | Description |
---|---|
int | The value. |
ReadInt64()
Reads a 64-bit integer value from the input stream.
Declaration
long ReadInt64()
Returns
Type | Description |
---|---|
long | The value. |
ReadSingle()
Reads a floating-point value from the input stream.
Declaration
float ReadSingle()
Returns
Type | Description |
---|---|
float | The value. |
ReadString(uint)
Reads a string value from the input stream.
Declaration
string ReadString(uint codeUnitCount)
Parameters
Type | Name | Description |
---|---|---|
uint | codeUnitCount | The length of the string. |
Returns
Type | Description |
---|---|
string | The value. |
ReadTimeSpan()
Reads a time interval from the input stream.
Declaration
TimeSpan ReadTimeSpan()
Returns
Type | Description |
---|---|
TimeSpan | The value. |
ReadUInt16()
Reads a 16-bit unsigned integer from the input stream.
Declaration
ushort ReadUInt16()
Returns
Type | Description |
---|---|
ushort | The value. |
ReadUInt32()
Reads a 32-bit unsigned integer from the input stream.
Declaration
uint ReadUInt32()
Returns
Type | Description |
---|---|
uint | The value. |
ReadUInt64()
Reads a 64-bit unsigned integer from the input stream.
Declaration
ulong ReadUInt64()
Returns
Type | Description |
---|---|
ulong | The value. |