Output​Stream​Over​Stream Output​Stream​Over​Stream Output​Stream​Over​Stream Class


Provides a Windows Runtime output stream for an IStream base implementation.

public : sealed class OutputStreamOverStream : IClosable, IOutputStreampublic sealed class OutputStreamOverStream : IDisposable, IOutputStreamPublic NotInheritable Class OutputStreamOverStream Implements IDisposable, IOutputStream
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


The InputStreamOverStream, OutputStreamOverStream, and RandomAccessStreamOverStream classes are interop helpers to convert between the Windows Runtime stream types, which are natively asynchronous, and the Component Object Model (COM) IStream types, which are natively synchronous.

These helper classes make it easier for to reuse legacy code when you transition to the Windows Runtime stream types.


Close() Close() Close()

Closes the current stream and releases system resources.

public : void Close()This member is not implemented in C#This member is not implemented in VB.Net

Dispose() Dispose() Dispose()

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

This member is not implemented in C++void Dispose()Sub Dispose

FlushAsync() FlushAsync() FlushAsync()

Flushes data asynchronously in a sequential stream.

public : IAsyncOperation<PlatForm::Boolean> FlushAsync()public IAsyncOperation<bool> FlushAsync()Public Function FlushAsync() As IAsyncOperation( Of bool )
IAsyncOperation<PlatForm::Boolean> IAsyncOperation<bool> IAsyncOperation<bool>

The stream flush operation.



The FlushAsync method may produce latencies and does not always guarantee durable and coherent storage of data. It's generally recommended to avoid this method if possible.

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

Writes data asynchronously in a sequential stream.

public : IAsyncOperationWithProgress<unsigned short, unsigned short> WriteAsync(IBuffer buffer)public IAsyncOperationWithProgress<uint, uint> WriteAsync(IBuffer buffer)Public Function WriteAsync(buffer As IBuffer) As IAsyncOperationWithProgress( Of uint, uint )
IBuffer IBuffer IBuffer

The buffer into which the asynchronous writer operation writes.

IAsyncOperationWithProgress<unsigned short, unsigned short> IAsyncOperationWithProgress<uint, uint> IAsyncOperationWithProgress<uint, uint>

The byte writer operation.


See Also