|
Qore Programming Language Reference Manual
0.8.12
|
This class defines an abstract interface for input streams. More...

Public Member Functions | |
| abstract *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... | |
| abstract nothing | close () |
| Closes the input stream and releases any resources. More... | |
| constructor () | |
| Constructor. More... | |
| abstract 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... | |
This class defines an abstract interface for input streams.
Classes inheriting this class can be used to read bytes from various sources.
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 |
| IO-ERROR | if an I/O error occurs |
| TIMEOUT-ERROR | if no byte could be read in the specified timeout |
Implemented in Qore::BinaryInputStream, Qore::FileInputStream, and Qore::EncodingConversionInputStream.
|
pure virtual |
Closes the input stream and releases any resources.
Any methods called on a closed input stream will thrown an IO-ERROR exception.
| IO-ERROR | if an I/O error occurs |
Implemented in Qore::BinaryInputStream, Qore::FileInputStream, and Qore::EncodingConversionInputStream.
| Qore::InputStream::constructor | ( | ) |
Constructor.
Used by subclasses defined in the Qore programming language.
|
pure 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 |
| IO-ERROR | if an I/O error occurs |
| TIMEOUT-ERROR | if no byte could be read in the specified timeout |
Implemented in Qore::BinaryInputStream, Qore::FileInputStream, and Qore::EncodingConversionInputStream.