Qore Programming Language Reference Manual
0.8.12
|
An InputStream implementation that performs on-the-fly conversion between two character encodings. More...
Public Member Functions | |
*binary | bulkRead (int limit, timeout timeout_ms=-1) |
Reads bytes (up to a specified limit) from the input stream; returns NOTHING if there are no more bytes in the stream. More... | |
nothing | close () |
Closes the underlying input stream. More... | |
constructor (Qore::InputStream is, string sourceEncoding, string destEncoding) | |
Creates the EncodingConversionInputStream based on the InputStream given. More... | |
int | read (timeout timeout_ms=-1) |
Reads a single byte from the input stream; returns -1 if the end of the stream has been reached. More... | |
![]() | |
constructor () | |
Constructor. More... | |
An InputStream implementation that performs on-the-fly conversion between two character encodings.
|
virtual |
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 |
timeout_ms | a timeout period with a resolution of milliseconds (a relative date/time value; integer arguments will be assumed to be milliseconds); if not given or negative the call will never time out |
ENCODING-CONVERSION-ERROR | if an invalid multibyte sequence is encountered in the input |
Implements Qore::InputStream.
|
virtual |
Closes the underlying input stream.
Any methods called on a closed input stream will thrown an IO-ERROR exception.
IO-ERROR | if an I/O error occurs |
Implements Qore::InputStream.
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 |
Reads a single byte from the input stream; returns -1 if the end of the stream has been reached.
timeout_ms | a timeout period with a resolution of milliseconds (a relative date/time value; integer arguments will be assumed to be milliseconds); if not given or negative the call will never time out |
ENCODING-CONVERSION-ERROR | if an invalid multibyte sequence is encountered in the input |
Implements Qore::InputStream.