Module: Advanced Tools Package: Streams
RWSynchronizedUCharInputStreamImp RWTInputStreamLockImp<RWUCharInputStream, RWFilteredUCharInputStreamImp>
#include <rw/stream/RWSynchronizedUCharInputStreamImp.h>
Class RWSynchronizedUCharInputStreamImp implements a simple lock stream that is used with UTF-16 character input stream. The stream locks its internal synchronization mechanism before forwarding input requests to its associated source stream, and then unlocks the internal synchronization mechanism upon completion. The stream's internal synchronization mechanism is locked using a guard object, ensuring its proper release in the event that an exception is thrown.
RWSynchronizedUCharInputStreamImp(RWUCharInputStream&
sourceStream);
Initializes the reference to the input stream that will be used as the source of UTF-16 characters.
Parameter List
sourceStream |
The input stream that will serve as the source of UTF-16 characters. |
static RWUCharInputStream make(RWUCharInputStream& sourceStream);
Constructs an RWSynchronizedUCharInputStreamImp instance that uses sourceStream as its source of UTF-16 characters, and returns a handle to it. Throws no exceptions.
Parameter List
sourceStream |
The output stream that will serve as the source of UTF-16 characters. |
virtual RWSize readUntil(RWUChar* unicodeArray, RWSize maxSize,
RWUChar delim);
Reads UTF-16 characters from the stream until the last UTF-16 character read is equal to delim, or maxSize UTF-16 characters have been read, or the end of the input sequence is reached. The UTF-16 characters read are stored in UTF-16Array. The function returns the actual number of UTF-16 characters(s) read from the stream.
Parameter List
unicodeArray |
A pointer to the array receiving the UTF-16 characters extracted from the stream. |
maxSize |
The maximum number of UTF-16 characters to be read. |
delim |
The UTF-16 character used as a delimiter. |
© 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.