downloadStream

open override fun downloadStream(entity: EntityValue, link: StreamLink, headers: HttpHeaders, options: RequestOptions): ByteStream

Obtain a stream for downloading the content of a stream property from the target system. Caution: streams are often used for large content that may not fit (all at once) in available application memory. Having too many threads simultaneously downloading streams, or using {@link com.sap.cloud.mobile.kotlin.odata.ByteStream#readAndClose() ByteStream.readAndClose}, may result in out-of-memory conditions on memory-constrained devices.

See Also:

{@link com.sap.cloud.mobile.kotlin.odata.Property#getStreamLink(com.sap.cloud.mobile.kotlin.odata.StructureBase) Property.getStreamLink}.

Return

A stream for downloading the content of a stream property. This must be closed by the caller, or else a resource leak may occur.

Parameters

entity

Entity containing the stream property whose content is to be downloaded.

link

Stream link for the stream to be downloaded.

headers

Request-specific headers.

options

Request-specific options.