IO

Description

A protocol that includes the functions of the image/document IO.

Members

function Description
func loadData(data:Data, mode:DcsModeEnum) -> Void Loads the buffer data to DcsBuffer in image or document format.
func loadFile(file: String, mode:DcsModeEnum) -> Void Loads images or documents to DcsBuffer.
func loadDataAsync(data:Data, mode:DcsModeEnum, onSuccess: onLoadSuccess, onFailure: onLoadFailure) -> Void Loads images from buffer asynchronously and converts them to dcsImage or dcsDocument in DcsBuffer according to the value of mode.
func loadFileAsync(file: String, mode:DcsModeEnum) -> Void Loads images or documents to DcsBuffer from file asynchronously.
func save(indice:[Any], file:String, encodeParameter:DcsEncodeParameter) -> Void Saves images in DcsBuffer to file system.
func saveAsync(indice: [Any], filename:String, encodeParameter: DcsEncodeParameter, onSuccess: onSaveSuccess, onFailure: onSaveFailure, onProgress: onSaveProgress)  -> Void Saves images in DcsBuffer to file system asynchronously.
func upload (indice:[Any], uploadConfig:DcsHttpUploadConfig , encodeParameter: DcsEncodeParameter) -> Data Uploads images synchronously. The selected image data in DcsBuffer will be encoded according to the value of encodeParameter and uploaded to the specified HTTP server.
func uploadAsync (indice:[Any], uploadConfig:DcsHttpUploadConfig , encodeParameter: DcsEncodeParameter, onSuccess: onUploadSuccess, onFailure: onUploadFailure, onProgress: onUploadProgress) -> Void Uploads images asynchronously. The selected image data in DcsBuffer will be encoded according to the value of encodeParameter and uploaded to the specified HTTP server.
func download(config:DcsHttpDownloadConfig, mode:DcsModeEnum) -> Void Downloads images synchronously and converts them to dcsImage or dcsDocument in DcsBuffer according to the value of mode.
func downloadAsync(config:DcsHttpDownloadConfig, mode:DcsModeEnum, onSuccess: onDownloadSuccess, onFailure: onDownloadFailure, onProgress: onDownloadProgress) -> Void Downloads images asynchronously and converts them to dcsImage or dcsDocument in DcsBuffer according to the value of mode.