Main Content



Save next buffer of data for GenericConsumer


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


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

putData determines what method to call based on the following:

  • If this GenericConsumer was created using the GenericConsumer(puthandle) constructor or delegateTo returned a delegate that accepted the message, then putData calls the function in PutMethod with data as an argument.

  • If there was consumer that accepted the message, then putData calls putData, which appends data to Response.Body.Data.

Input Arguments

expand all

Content consumer, specified as a object.

Buffer of raw data in a 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.

If data is [] to indicate that the message has ended and there was a delegate, then putData copies the Response from the delegate to this object's Response.

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.



Version History

Introduced in R2018a