$darkmode
![]() |
Qore Programming Language Reference Manual 1.18.0
|
An InputStream implementation that performs on-the-fly conversion between two character encodings. More...
#include <QC_EncodingConversionInputStream.dox.h>
Public Member Functions | |
constructor (Qore::InputStream is, string sourceEncoding, string destEncoding) | |
Creates the EncodingConversionInputStream based on the InputStream given. More... | |
int | peek () |
Peeks the next byte available from the input stream; returns -1 if no more data available. More... | |
*binary | read (int limit) |
Reads bytes (up to a specified limit) from the input stream; returns NOTHING if there are no more bytes in the stream. More... | |
![]() | |
constructor () | |
Constructor. More... | |
abstract int | peek () |
Peeks the next byte available from the input stream; returns -1 if no more data available. More... | |
abstract *binary | read (int limit) |
Reads bytes (up to a specified limit) from the input stream; returns NOTHING if there are no more bytes in the stream. More... | |
![]() | |
constructor () | |
Throws an exception if called directly; this class can only be instantiated by builtin subclasses. More... | |
int | getThreadId () |
Get the currently assigned thread id or -1 if not assigned to any thread. | |
nothing | reassignThread () |
Reassigns current thread as thread used for stream manipulation. More... | |
nothing | unassignThread () |
Unassigns current thread as thread used for stream manipulation. More... | |
An InputStream implementation that performs on-the-fly conversion between two character encodings.
STREAM-THREAD-ERROR
to be thrown, unless the stream is handed off to another thread using the StreamBase::unassignThread() method in the thread that currently owns the stream, and the StreamBase::reassignThread() method in the new thread.Qore::EncodingConversionInputStream::constructor | ( | Qore::InputStream | is, |
string | sourceEncoding, | ||
string | destEncoding | ||
) |
Creates the EncodingConversionInputStream based on the InputStream given.
is | the source InputStream to read bytes from |
sourceEncoding | the encoding of the characters in the source input stream |
destEncoding | the destination character encoding |
ENCODING-CONVERSION-ERROR | if either of the encodings is unsupported |
|
virtual |
Peeks the next byte available from the input stream; returns -1 if no more data available.
ENCODING-CONVERSION-ERROR | if an invalid multibyte sequence is encountered in the input |
STREAM-THREAD-ERROR | this exception is thrown if this method is called from any thread other than the thread that created the object |
Implements Qore::InputStream.
Reads bytes (up to a specified limit) from the input stream; returns NOTHING if there are no more bytes in the stream.
limit | the maximum number of bytes to read |
ENCODING-CONVERSION-ERROR | if an invalid multibyte sequence is encountered in the input |
INPUT-STREAM-ERROR | limit is not positive |
STREAM-THREAD-ERROR | this exception is thrown if this method is called from any thread other than the thread that created the object |
Implements Qore::InputStream.