qisdk / com.aldebaran.qi.sdk.util / copyToStream

copyToStream

@JvmOverloads fun StreamableBuffer.copyToStream(outputStream: OutputStream, chunkSize: Long = DEFAULT_CHUNK_SIZE): Unit

Copy a StreamableBuffer to an OutputStream, chunk by chunk.

Parameters

outputStream - the destination OutputStream.

chunkSize - the chunk size.

Receiver
the StreamableBuffer to be copied.

Since
7

@JvmOverloads fun Async.copyToStream(outputStream: OutputStream, chunkSize: Long = DEFAULT_CHUNK_SIZE): Future<Void>

Copy a StreamableBuffer to an OutputStream, chunk by chunk, asynchronously.

Parameters

outputStream - the destination OutputStream.

chunkSize - the chunk size.

Receiver
the StreamableBuffer.Async to be copied.

Return
A Future that is completed when the StreamableBuffer is copied entirely.

Since
7