# Poco

# class URIStreamFactory

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

## Description

This class defines the interface that all URI stream factories must implement.

Subclasses must implement the open() method.

## Inheritance

Known Derived Classes: DataURIStreamFactory, FileStreamFactory, Poco::Net::FTPStreamFactory, Poco::Net::HTTPStreamFactory, Poco::Net::FTPSStreamFactory, Poco::Net::HTTPSStreamFactory

## Member Summary

Member Functions: open

## Constructors

### URIStreamFactory

URIStreamFactory();

Creates the URIStreamFactory.

## Destructor

### ~URIStreamFactory

virtual ~URIStreamFactory();

Destroys the URIStreamFactory.

## Member Functions

### open

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

Tries to create and open an input stream for the resource specified by the given URI.

If the stream cannot be opened for whatever reason, an appropriate IOException must be thrown.

If opening the stream results in a redirect, a URIRedirection exception should be thrown.