RandomAccessStream Class

Definition

Provides random access of data in input and output streams.

public ref class RandomAccessStream abstract sealed
class RandomAccessStream abstract sealed
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Muse(Version=100794368)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Storage.Streams.IRandomAccessStreamStatics), 65536, typeof(Windows.Foundation.UniversalApiContract))]
public static class RandomAccessStream
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Muse(Version=100794368)]
[Windows.Foundation.Metadata.Static(typeof(Windows.Storage.Streams.IRandomAccessStreamStatics), 65536, "Windows.Foundation.UniversalApiContract")]
public static class RandomAccessStream
Public Class RandomAccessStream
Inheritance
RandomAccessStream
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

For more info, see Quickstart: Reading and writing files, which shows how to read and write bytes to a file by using a RandomAccessStream. To encode an image by using a stream, see Imaging.

Methods

CopyAndCloseAsync(IInputStream, IOutputStream)

Copies a source stream to a destination stream and waits for the copy operation to complete.

CopyAsync(IInputStream, IOutputStream)

Copies a source stream to a destination stream.

CopyAsync(IInputStream, IOutputStream, UInt64)

Copies the specified number of bytes from a source stream to a destination stream.

Applies to