RWBufferedCharInputStreamImp Class Reference
[Streams]
Implements a buffer that can be used with narrow character input streams.
More...
#include <rw/stream/RWBufferedCharInputStreamImp.h>
List of all members.
Detailed Description
Class RWBufferedCharInputStreamImp implements a buffer that can be used with narrow character input streams. The size of the buffer is specified in its static member make() function, which is used to create it.
Constructor & Destructor Documentation
RWBufferedCharInputStreamImp::RWBufferedCharInputStreamImp |
( |
const RWCharInputStream & |
sourceStream |
) |
[protected] |
Initializes the reference to the input stream that will be used as the source of narrow characters, as well as the internal buffer capacity, which will be equal to RW_STREAM_BUFFER_SIZE.
- Exceptions:
-
| RWExternalStreamException | Thrown if an illegal buffer size was requested or if the memory allocation request for the buffer fails. |
- Parameters:
-
| sourceStream | Input stream that will serve as the source of narrow characters. |
RWBufferedCharInputStreamImp::RWBufferedCharInputStreamImp |
( |
const RWCharInputStream & |
sourceStream, |
|
|
RWSize |
bufSize | |
|
) |
| | [protected] |
Initializes the reference to the input stream that will be used as the source of narrow characters, as well as the buffer capacity.
- Exceptions:
-
| RWExternalStreamException | Thrown if an illegal buffer size was requested or if the memory allocation request for the buffer fails. |
- Parameters:
-
| sourceStream | Input stream that will serve as the source of narrow characters. |
| bufSize | Buffer capacity in number of narrow characters. |
RWBufferedCharInputStreamImp::RWBufferedCharInputStreamImp |
( |
const RWCharInputStream & |
sourceStream, |
|
|
char * |
buffer, |
|
|
RWSize |
bufSize | |
|
) |
| | [protected] |
Initializes the reference to the input stream that will be used as the source of narrow characters, as well as the internal buffer.
- Exceptions:
-
| RWExternalStreamException | Thrown if an illegal buffer size was requested or if the memory allocation request for the buffer fails. |
- Parameters:
-
| sourceStream | Input stream that will serve as the source of narrow characters. |
| buffer | Pre-allocated buffer of size bufSize to be used internally by the constructed RWBufferedCharInputStreamImp object. |
| bufSize | Buffer capacity in number of narrow characters. |
Member Function Documentation
Constructs an RWBufferedCharInputStreamImp instance that uses sourceStream as its source of narrow characters, and returns a handle to it. The internal buffer is initialized using the pre-allocated narrow character's array of size bufSize.
- Exceptions:
-
| RWExternalStreamException | Thrown if an illegal buffer size was requested or if the memory allocation request for the buffer fails. |
- Parameters:
-
| sourceStream | The input stream that will serve as the source of narrow characters. |
| buffer | A pre-allocated buffer of size bufSize to be used internally by the constructed RWBufferedCharInputStreamImp object. |
| bufSize | The buffer capacity in number of narrow characters. |
virtual void RWBufferedCharInputStreamImp::readStringUntil |
( |
RWCString & |
string, |
|
|
char |
delim | |
|
) |
| | [virtual] |
Reads narrow character(s) from the attached source stream until the last character read is equal to delim, or the end of the input sequence is reached. The narrow character(s) read are stored in a narrow string object.
- Parameters:
-
| string | A string object receiving the narrow character(s) extracted from the stream. |
| delim | The narrow character used as a delimeter. |
Reimplemented from RWFilteredCharInputStreamImp.