Share via


CustomProtectedOutputStream.create asynchronous method

Asynchronously creates an OutputStream for writing protected content.

This method is asynchronous as it may require server client communication.

When publishing content your app is required to call CustomProtectedOutputStream.close after it is finished writing the content to the CustomProtectedOutputStream. If the flush() is not called we cannot guarantee that all the encrypted data is stored to the backing stream.

Signature

public static IAsyncControl create(OutputStream backingOutputStream,
                                       UserPolicy userPolicy,
                                       CreationCallback<CustomProtectedOutputStream> callback)
            throws InvalidParameterException

Parameters

Name Datatype Notes
backingOutputStream
OutputStream
userPolicy
UserPolicy
callback
CreationCallback<CustomProtectedOutputStream>

Returns

IAsyncControl if an async operation is in progress else null is returned.

Throws

InvalidParameterException if no callback is available that onFailure can be called.

Defined in

CustomProtectedOutputStream.java

Supported Platforms

Minimum supported OS version
Android 4.0.3 (API level 15)