Class RandomAccessStreamDataSink

Implements a IDataSink for a Windows.Storage.Streams.IRandomAccessStream

Inheritance
System.Object
RandomAccessStreamDataSink
Implements
Namespace: PSPDFKitFoundation.Data
Assembly: PSPDFKitFoundation.dll
Syntax
public sealed class RandomAccessStreamDataSink : object, IDataSink

Constructors

RandomAccessStreamDataSink(DataSinkOption)

Declaration
public RandomAccessStreamDataSink(DataSinkOption option)
Parameters
Type Name Description
DataSinkOption option

Whether data should be appended to or replaced.

Properties

DataSinkOption

The DataSinkOption the data sink was constructed with.

Declaration
public DataSinkOption DataSinkOption { get; }
Property Value
Type Description
DataSinkOption

Finished

Set to true if Finish() is called.

Declaration
public bool Finished { get; }
Property Value
Type Description
System.Boolean

Stream

The Windows.Storage.Streams.IRandomAccessStream to be written to.

Declaration
public IRandomAccessStream Stream { get; set; }
Property Value
Type Description
Windows.Storage.Streams.IRandomAccessStream

Methods

Finish()

All writing operations are complete. This can be useful for situations such as encrypting the output.

Declaration
public bool Finish()
Returns
Type Description
System.Boolean

True if successful.

WriteDataAsync(IBuffer)

Data to be written or appended to the data sink.

Declaration
public IAsyncOperation<bool> WriteDataAsync(IBuffer data)
Parameters
Type Name Description
Windows.Storage.Streams.IBuffer data

The Windows.Storage.Streams.IBuffer of data to be written.

Returns
Type Description
Windows.Foundation.IAsyncOperation<System.Boolean>

True if successful.

Implements

IDataSink