charsetConverter Class Reference

Convert between charsets. More...

Inheritance diagram for charsetConverter:
Inheritance graph
[legend]
Collaboration diagram for charsetConverter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 charsetConverter (const charset &source, const charset &dest)
 ~charsetConverter ()
void convert (const string &in, string &out)
void convert (utility::inputStream &in, utility::outputStream &out)

Detailed Description

Convert between charsets.


Constructor & Destructor Documentation

charsetConverter ( const charset source,
const charset dest 
)

Construct and initialize a charset converter.

Parameters:
source input charset
dest output charset

References charset::getName().

~charsetConverter (  ) 

Member Function Documentation

void convert ( utility::inputStream in,
utility::outputStream out 
)

Convert the contents of an input stream in a specified charset to another charset and write the result to an output stream.

Parameters:
in input stream to read data from
out output stream to write the converted data
Exceptions:
exceptions::charset_conv_error if an error occured during the conversion

References inputStream::eof(), outputInvalidChar(), inputStream::read(), and outputStream::write().

void convert ( const string in,
string out 
)

Convert a string buffer from one charset to another charset (in-memory conversion).

Deprecated:
Use the new convert() method, which takes an outputStream parameter.
Parameters:
in input buffer
out output buffer
Exceptions:
exceptions::charset_conv_error if an error occured during the conversion

References outputStreamStringAdapter::flush().

Referenced by wordEncoder::getNextChunk().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2