Main Content

putData

Class: matlab.net.http.io.BinaryConsumer
Package: matlab.net.http.io

Save next buffer of data for BinaryConsumer

Syntax

[len,stop] = putData(consumer,data)

Description

[len,stop] = putData(consumer,data) stores the next buffer of data. This method is an overridden method of putData.

Input Arguments

expand all

Content consumer, specified as a matlab.net.http.io.BinaryConsumer object.

Buffer of raw data in a matlab.net.http.ResponseMessage object, specified as a nonempty uint8 vector, uint8.empty, or []. For more information about these values, see the data input argument for the ContentConsumer.putData method.

When MATLAB® calls this function, it provides data as a uint8 vector. This function appends the vector at the position CurrentLength+1 in Response.Body.Data, increasing the size of data, if necessary, to make room for future data.

If you call this method to store your own data, then you can provide data of any type that is compatible with data already inResponse.Body.Data.

Output Arguments

expand all

Length of data processed, returned as double or empty double. For more information, see the size argument in ContentConsumer.putData.

Indicate whether to receive further data from this message, returned as true or false. For more information, see the stop argument in ContentConsumer.putData.

Attributes

Accesspublic
Introduced in R2018a