download()

Description

Downloads images synchronously and converts them to dcsImage or dcsDocument in DcsBuffer according to the value of mode.

Syntax

func download(config:DcsHttpDownloadConfig, mode:DcsModeEnum)

Parameters

config:DcsHttpDownloadConfig Configuration for HTTP download.
mode:DcsModeEnum Indicates if the downloaded files are images or documents.

Return value

Void

Exceptions

Circumstance Exception thrown
License verification failed. DcsLicenseVerificationFailedException
Downloaded files are not able to decode. DcsDataFormatInvalidException
Download fails due to the network issue. DcsHttpErrorException
No network connection. DcsNetworkDisconnectedException
config is nil or there are errors in data. DcsValueNotValidException
Mode is not DME_DOCUMENT nor DME_IMAGE. DcsValueOutOfRangeException