Qore Programming Language Reference Manual
0.8.13.6
|
An InputStream implementation that performs on-the-fly conversion between two character encodings. More...
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... | |
An InputStream implementation that performs on-the-fly conversion between two character encodings.
STREAM-THREAD-ERROR
to be thrown.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.