Poco

class DataURIStreamFactory

File Information

Library: Foundation
Package: URI
Header: Poco/DataURIStreamFactory.h

Description

An implementation of the URIStreamFactory interface that read data from data URIs. For example, for URI "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D" it read "Hello, World!".

Inheritance

Direct Base Classes: URIStreamFactory

All Base Classes: URIStreamFactory

Member Summary

Member Functions: open, registerFactory, unregisterFactory

Inherited Functions: open

Constructors

DataURIStreamFactory

DataURIStreamFactory();

Creates the DataURIStreamFactory.

Destructor

~DataURIStreamFactory virtual

~DataURIStreamFactory();

Destroys the DataURIStreamFactory.

Member Functions

open virtual

std::istream * open(
    const URI & uri
);

Creates an input stream returning decoded data from the given data URI.

Throws a DataFormatException exception if the data is incorrect format.

registerFactory static

static void registerFactory();

Registers the DataURIStreamFactory with the default URIStreamOpener instance.

unregisterFactory static

static void unregisterFactory();

Unregisters the DataURIStreamFactory with the default URIStreamOpener instance.

Securely control IoT edge devices from anywhere   Connect a Device