Module: Advanced Tools Package: Streams
RWUCharToUTF8ByteOutputStreamImp RWUCharOutputStreamImp RWOutputStreamImp RWStreamImp RWBodyBase
close() flush() getSinkStream() |
isBad() isFail() isGood() |
make() RWUCharToUTF8ByteOutputStreamImp() write() |
~RWUCharToUTF8ByteOutputStreamImp() |
#include <rw/stream/RWUCharToUTF8ByteOutputStreamImp.h>
Concrete class connecting a UTF-16 character stream to aUTF-8 binary stream. The UTF-16 characters are transformed as a sequence of UTF-8 bytes. UTF-8 is a variable length encoding of the Unicode Standard using 8-bit sequences, where the high bits indicate which part of the sequence a byte belongs to. Implements the body idiom from the handle-body pattern.
RWUCharToUTF8ByteOutputStreamImp(RWByteOutputStream&
sinkStream);
Initializes the reference to the binary stream that will be used as the sink of bytes.
Parameter List
sinkStream |
The binary stream that will serve as the sink of bytes. |
virtual ~RWUCharToUTF8ByteOutputStreamImp();
Destructor.
static RWUCharOutputStream make(RWByteOutputStream& sink);
Constructs an RWUCharToUTF8ByteOutputStreamImp instance that uses sink as its sink of bytes, and returns a handle to it. Throws no exceptions.
Parameter List
sink |
The binary stream that is used as the sink of bytes. |
virtual void close();
This function is forwarded to the binary stream used as the sink of bytes.
virtual void flush();
This function is forwarded to the binary stream used as the sink of bytes.
virtual bool isBad() const;
This function is forwarded to the binary stream used as the sink of bytes. Throws no exceptions.
virtual bool isFail() const;
This function is forwarded to the binary stream used as the sink of bytes. Throws no exceptions.
virtual bool isGood() const;
This function is forwarded to the binary stream used as the sink of bytes. Throws no exceptions.
virtual void write(RWUChar unicodeValue);
Encodes, and writes a single UTF-16 character to the binary stream used as the sink of bytes.
Parameter List
unicodeValue |
The UTF-16 character to be encoded. |
virtual void write(const RWUChar* unicodeArray, RWSize numUChars);
Encodes, and writes an array of UTF-16 characters to the stream used as the sink of bytes.
Parameter List
unicodeArray |
A pointer to the first element of the array. |
numUChars |
The number of UTF-16 characters to be encoded. |
RWByteOutputStream& getSinkStream(); const RWByteOutputStream& getSinkStream() const;
These functions return a reference to the binary stream that is used as the sink of bytes. They throw no exceptions.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.