Convert data to string in StringConsumer
str = convert(consumer,data)
converts a buffer of
str = convert(
data to a string or character vector,
str, based on the current values of Charset
This has the same behavior as
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
putData except to pass in empty
data at the
end of the stream to tell this class that input has ended.
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.
consumer— Content consumer
Content consumer, specified as a
data— Buffer of raw data
Buffer of raw data in
ResponseMessage, specified as a
Text, returned as a string or character vector.