From v4.1 to v4.2
Stream::readBytes() has been virtualised and overridden for
descendents for more efficient operation, especially with ArduinoJson.
For normal read operations where the stream position is to be updated, applications should use
this method in preference to
An addition method
IDataSourceStream::moveString() has been added to support extracting
the content of a memory-based stream into a String object without duplicating the data.
This is supported by
Stream / file seeking
To provide a consistent interface
SeekOrigin is now used with all seek methods for streams,
and also by file system functions. Mappings are:
SeekOrigin::Start instead of eSO_FileStart SeekOrigin::Current instead of eSO_CurrentPos SeekOrigin::End instead of eSO_FileEnd
These map to the standard C SEEK_SET, SEEK_CUR and SEEK_END but as SeekOrigin is strongly typed
it offers compile-time checking, and has a
If you have set a non-memory stream type (e.g.
FileStream) which does not implement
then an invalid String will be returned. In this situation you should use
ContentType / MIME types
String toString(MimeType)() has been moved out of the
so no longer requires the