Library: Foundation
Package: Text
Header: Poco/StreamConverter.h
A StreamConverter converts streams from one encoding (inEncoding) into another (outEncoding). If a character cannot be represented in outEncoding, defaultChar is used instead. If a byte sequence is not valid in inEncoding, defaultChar is used instead and the encoding error count is incremented.
Direct Base Classes: UnbufferedStreamBuf
All Base Classes: UnbufferedStreamBuf
Member Functions: errors, readFromDevice, writeToDevice
StreamConverterBuf(
    std::istream & istr,
    const TextEncoding & inEncoding,
    const TextEncoding & outEncoding,
    int defaultChar = '?'
);
Creates the StreamConverterBuf and connects it to the given input stream.
StreamConverterBuf(
    std::ostream & ostr,
    const TextEncoding & inEncoding,
    const TextEncoding & outEncoding,
    int defaultChar = '?'
);
Creates the StreamConverterBuf and connects it to the given output stream.
Destroys the StreamConverterBuf.
int errors() const;
Returns the number of encoding errors encountered.
 
 int readFromDevice();
 
 int writeToDevice(
    char c
);