IOutputStream IOutputStream IOutputStream IOutputStream Interface

Represents a sequential stream of bytes to be written.

Syntax

Declaration

public interface IOutputStreampublic interface IOutputStreamPublic Interface IOutputStreampublic interface IOutputStream

Inheritance Hierarchy

Inherited Members

Inherited methods

Methods summary

Flushes data asynchronously in a sequential stream.

Writes data asynchronously in a sequential stream.

Methods

  • FlushAsync()
    FlushAsync()
    FlushAsync()
    FlushAsync()

    Flushes data asynchronously in a sequential stream.

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

    Returns

    • The stream flush operation.

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

    Writes data asynchronously in a sequential stream.

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

    Parameters

    Returns

    • The byte writer operation.

    Remarks

    Some stream implementations support queuing of write operations. In this case, the asynchronous execution of the WriteAsync(IBuffer) method does not complete until the FlushAsync() method has completed. For the buffer parameter, you don't have to implement the IBuffer interface. Instead, you can create an instance of the Buffer class or create a buffer by using methods in the CryptographicBuffer class.

    Also consider writing a buffer into an IOutputStream by using the WriteBuffer(IBuffer, UInt32, UInt32) method of the DataWriter class.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.GuidAttribute

Details

Assembly

Windows.Storage.Streams.dll