Stream Classes

group stream

Data stream classes.

Unnamed Group

using StreamTransformerCallback = Delegate<size_t(const uint8_t *in, size_t inLength, uint8_t *out, size_t outLength)>

Class that can be used to transform streams of data on the fly.

Callback specification for the stream transformers


See StreamTransformer::transform() method for details


using FlashMemoryStream = FSTR::Stream

Provides a read-only stream buffer on flash storage.

using TemplateFlashMemoryStream = FSTR::TemplateStream

Template stream using content stored in flash.

class CircularBuffer : public ReadWriteStream
#include <CircularBuffer.h>

Circular stream class.

Base class for data source stream

class Base64OutputStream : public StreamTransformer
#include <Base64OutputStream.h>

Read-only stream to emit base64-encoded content from source stream.

class ChunkedStream : public StreamTransformer
#include <ChunkedStream.h>

Read-only stream to obtain data using HTTP chunked encoding.

Used where total length of stream is not known in advance

class IDataSourceStream : public Stream
#include <DataSourceStream.h>

Base class for read-only stream.

Subclassed by FSTR::Stream, Graphics::SubStream, IFS::FWFS::ArchiveStream, MultiStream, ReadWriteStream, SectionStream, SharedMemoryStream< T >, StreamTransformer, TemplateStream, UrlencodedOutputStream, XorOutputStream

class EndlessMemoryStream : public ReadWriteStream
#include <EndlessMemoryStream.h>

Memory stream that stores unlimited number of bytes.

Memory is allocated on write and released when all written bytes have been read out. This behaviour differs from a circular buffer as the size is not fixed.

class FileStream : public IFS::FileStream
#include <FileStream.h>

File stream class.

class GdbFileStream : public IFS::FileStream
#include <GdbFileStream.h>

GDB File stream class to provide access to host files whilst running under debugger.

class DirectoryTemplate : public SectionTemplate
#include <DirectoryTemplate.h>

Directory stream class.

Subclassed by IFS::HtmlDirectoryTemplate, IFS::JsonDirectoryTemplate

class FileStream : public IFS::FsBase, public ReadWriteStream
#include <FileStream.h>

File stream class.

Subclassed by FileStream, GdbFileStream, HostFileStream

class HtmlDirectoryTemplate : public IFS::DirectoryTemplate
#include <HtmlDirectoryTemplate.h>

Read-only stream access to directory listing with HTML output.

class LimitedMemoryStream : public ReadWriteStream
#include <LimitedMemoryStream.h>

Memory stream operating on fixed-size buffer Once the limit is reached the stream will discard incoming bytes on write.

class MemoryDataStream : public ReadWriteStream
#include <MemoryDataStream.h>

Read/write stream using expandable memory buffer.

This is intended to allow data to be streamed into it, then streamed back out at a later date.

It is not intended to have data continuously written in and read out; memory is not reclaimed as it is read.

Subclassed by IFS::FWFS::ObjectBuffer, JsonObjectStream

class MultipartStream : public MultiStream
#include <MultipartStream.h>

Read-only stream for creating HTTP multi-part content.



class MultiStream : public IDataSourceStream
#include <MultiStream.h>

Base class for read-only stream which generates output from multiple source streams.

Subclassed by MultipartStream, StreamChain

class QuotedPrintableOutputStream : public StreamTransformer
#include <QuotedPrintableOutputStream.h>

Read-only stream that transforms bytes of data into quoted printable data stream.

class ReadWriteStream : public IDataSourceStream
#include <ReadWriteStream.h>

Base class for read/write stream.

Subclassed by CircularBuffer, EndlessMemoryStream, HardwareSerial, IFS::FileStream, LimitedMemoryStream, MemoryDataStream, OtaUpgrade::BasicStream, Storage::PartitionStream

template<typename T>
class SharedMemoryStream : public IDataSourceStream
#include <SharedMemoryStream.h>

Memory stream operating on fixed shared buffer.

One reason for templating this class is for distinction between char or const char types, to avoid dangerous casts. Elements may be structures or other types.

class TemplateFileStream : public TemplateStream
#include <TemplateFileStream.h>

Template stream using content from the filesystem.

class TemplateStream : public IDataSourceStream
#include <TemplateStream.h>

Stream which performs variable-value substitution on-the-fly.

Template uses {varname} style markers which are replaced as the stream is read.

Subclassed by FSTR::TemplateStream, SectionTemplate, TemplateFileStream

class Directory : public IFS::Directory
#include <FileSystem.h>

Directory stream class.

class HostFileStream : public IFS::FileStream
#include <HostFileStream.h>

Host File stream class.

class TemplateStream : public TemplateStream
#include <TemplateStream.hpp>

Template Flash memory stream class.

class UrlencodedOutputStream : public IDataSourceStream
#include <UrlencodedOutputStream.h>

Represents key-value pairs as urlencoded string content.

class PartitionStream : public ReadWriteStream
#include <PartitionStream.h>

Stream operating directory on a Storage partition.

To support write operations, the target region must be erased first.

class JsonObjectStream : public MemoryDataStream
#include <JsonObjectStream.h>

JsonObject stream class.