convert
Class: matlab.net.http.io.StringConsumer
Namespace: matlab.net.http.io
Convert data to string in StringConsumer
Syntax
str = convert(consumer,data)
Description
converts a buffer of str
= convert(consumer
,data
)data
to a string or character vector,
str
, based on the current values of Charset
and TextType.
This has the same behavior as putData
,
but returns the converted string instead of storing it in
Response.Body.Data
. It does not update CurrentLength.
This is a utility method for the benefit of subclasses that want to interpret the data
as a string, and then process the results and store their own data in
Response.Body.Data
. Subclasses that use this method should not
call putData
except to pass in empty data
at the
end of the stream to tell this class that input has ended.
If data
ends with a partial multibyte character, that partial
character is saved internally and not returned until the next call to
convert
that provides the remainder of the bytes.
Input Arguments
Output Arguments
Attributes
Access | protected |
Version History
Introduced in R2018a