# Poco

# class TeeStreamBuf

Library: Foundation
Package: Streams
Header: Poco/TeeStream.h

## Description

This stream buffer copies all data written to or read from it to one or multiple output streams.

## Inheritance

Direct Base Classes: UnbufferedStreamBuf

All Base Classes: UnbufferedStreamBuf

## Member Summary

Member Functions: addStream, readFromDevice, writeToDevice

## Constructors

### TeeStreamBuf

TeeStreamBuf();

Creates an unconnected CountingStreamBuf. Use addStream() to attach output streams.

### TeeStreamBuf

TeeStreamBuf(
std::istream & istr
);

Creates the CountingStreamBuf and connects it to the given input stream.

### TeeStreamBuf

TeeStreamBuf(
std::ostream & ostr
);

Creates the CountingStreamBuf and connects it to the given output stream.

## Destructor

### ~TeeStreamBuf

~TeeStreamBuf();

Destroys the CountingStream.

## Member Functions

### addStream

void addStream(
std::ostream & ostr
);

Adds the given output stream.

### readFromDevice

int readFromDevice();

### writeToDevice

int writeToDevice(
char c
);