Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RandomAccessStream class

Applies to Windows and Windows Phone

Provides random access of data in input and output streams.

Syntax


var randomAccessStream = new Windows.Storage.Streams.RandomAccessStream();

Attributes

[MarshalingBehavior(Agile)]
[Muse()]
[Version(0x06020000)]

Members

The RandomAccessStream class has these types of members:

Methods

The RandomAccessStream class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
CopyAndCloseAsync 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.

 

Remarks

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

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.Storage.Streams
Windows::Storage::Streams [C++]

Metadata

Windows.winmd

See also

How to encode a new image
Reading and writing data sample
FileRandomAccessStream
InMemoryRandomAccessStream
RandomAccessStreamOverStream
RandomAccessStreamReference

 

 

Show:
© 2014 Microsoft. All rights reserved.