Main Content

putData

Class: matlab.net.http.io.FileConsumer
Namespace: matlab.net.http.io

Save next buffer of data to file for FileConsumer

Syntax

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

Description

[size,stop] = putData(consumer,data) stores the next buffer of data read from the server, writes data to the file, and returns the number of bytes written. This method is an overridden method of putData called by MATLAB®.

Input Arguments

expand all

Content consumer, specified as a matlab.net.http.io.FileConsumer 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.

Output Arguments

expand all

Number of bytes written to the file, returned as double or empty double. For more information, see the size argument in 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

Version History

Introduced in R2018a

See Also