InMemoryRandomAccessStream InMemoryRandomAccessStream InMemoryRandomAccessStream InMemoryRandomAccessStream InMemoryRandomAccessStream Class

Definition

Provides random access of data in input and output streams that are stored in memory instead of on disk.

public : sealed class InMemoryRandomAccessStream : IClosable, IInputStream, IOutputStream, IRandomAccessStream
struct winrt::Windows::Storage::Streams::InMemoryRandomAccessStream : IClosable, IInputStream, IOutputStream, IRandomAccessStream
public sealed class InMemoryRandomAccessStream : IDisposable, IInputStream, IOutputStream, IRandomAccessStream
Public NotInheritable Class InMemoryRandomAccessStream Implements IDisposable, IInputStream, IOutputStream, IRandomAccessStream
var inMemoryRandomAccessStream = new inMemoryRandomAccessStream();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Examples

See the code example in the DataReader topic.

Constructors

InMemoryRandomAccessStream() InMemoryRandomAccessStream() InMemoryRandomAccessStream() InMemoryRandomAccessStream() InMemoryRandomAccessStream()

Creates a new instance of the InMemoryRandomAccessStream class.

Properties

CanRead CanRead CanRead CanRead CanRead

Gets a value that indicates whether the stream can be read from.

CanWrite CanWrite CanWrite CanWrite CanWrite

Gets a value that indicates whether the stream can be written to.

Position Position Position Position Position

Gets the byte offset of the stream.

Size Size Size Size Size

Gets or sets the size of the random access stream.

Methods

CloneStream() CloneStream() CloneStream() CloneStream() CloneStream()

Creates a new instance of a IRandomAccessStream over the same resource as the current stream.

Close() Close() Close() Close() Close()

Closes the current stream and releases system resources.

Dispose() Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

FlushAsync() FlushAsync() FlushAsync() FlushAsync() FlushAsync()

Flushes data asynchronously in a sequential stream.

GetInputStreamAt(UInt64) GetInputStreamAt(UInt64) GetInputStreamAt(UInt64) GetInputStreamAt(UInt64) GetInputStreamAt(UInt64)

Returns an input stream at a specified location in a stream.

GetOutputStreamAt(UInt64) GetOutputStreamAt(UInt64) GetOutputStreamAt(UInt64) GetOutputStreamAt(UInt64) GetOutputStreamAt(UInt64)

Returns an output stream at a specified location in a stream.

ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions) ReadAsync(IBuffer, UInt32, InputStreamOptions)

Returns an asynchronous byte reader object.

Seek(UInt64) Seek(UInt64) Seek(UInt64) Seek(UInt64) Seek(UInt64)

Sets the position of the stream to the specified value.

WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer)

Writes data asynchronously in a sequential stream.