Interface IRandomAccessStream
Supports random access of data in input and output streams.
public interface IRandomAccessStream : IDisposable, IInputStream, IOutputStream
- Inherited Members
- Extension Methods
Properties
CanRead
Gets a value that indicates whether the stream can be read from.
bool CanRead { get; }
Property Value
- bool
True if the stream can be read from. Otherwise, false.
CanWrite
Gets a value that indicates whether the stream can be written to.
bool CanWrite { get; }
Property Value
- bool
True if the stream can be written to. Otherwise, false.
Position
Gets the byte offset of the stream.
ulong Position { get; }
Property Value
- ulong
The number of bytes from the start of the stream.
Remarks
The initial offset of a IRandomAccessStream is 0. This offset is affected by both IInputStream and IOutputStream operations.
Size
Gets or sets the size of the random access stream.
ulong Size { get; set; }
Property Value
- ulong
The size of the stream.
Methods
Seek(ulong)
Sets the position of the stream to the specified value.
void Seek(ulong position)
Parameters
position
ulongThe new position of the stream.
Remarks
Warning! This method does not check the position to make sure the value is valid for the stream. If the position is invalid for the stream, the ReadAsync and WriteAsync methods will return an error if you call them.