putData
Class: matlab.net.http.io.ImageConsumer
Namespace: matlab.net.http.io
Save data for ImageConsumer
Syntax
[len,stop] = putData(consumer,data)
Description
[
processes
buffers of len
,stop
] = putData(consumer
,data
) data
, based on the ContentType property, and returns the result as MATLAB® image data in the Response.Body.Data
property. This
method is an overridden method of putData
. Use this method in subclasses of
ImageConsumer
.
After all the data in the message, the result is RGB data or a cell array containing
image data, colormap, and possible transparency, as documented for the imread
function. For more information on image conversion, see the input
conversion section of the Data property.
This consumer does not guarantee that Response.Body.Data
has a
useful result until the end of the data is reached (after putData
is
passed empty data
). Subclasses that override this method, that want
to examine the data stream while it is being received, should look at
data
, not Response.Body.Data
.
Subclasses that only want to see the result after conversion to MATLAB image data can examine Response.Body.Data
after
calling this method with empty data
.
After the end of data, this method sets the Info property.
Input Arguments
Output Arguments
Attributes
Access | public |
Version History
Introduced in R2018a
See Also
putData
| ContentType | Info | imread
| matlab.net.http.MessageBody