Delen via


RandomAccessStream Class

Definition

Provides random access of data in input and output streams.

public ref class RandomAccessStream abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RandomAccessStream final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class RandomAccessStream
Public Class RandomAccessStream
Inheritance
Object Platform::Object IInspectable RandomAccessStream
Attributes

Windows 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, UInt64)

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

CopyAsync(IInputStream, IOutputStream)

Copies a source stream to a destination stream.

Applies to

See also