Qore Programming Language Reference Manual 1.14.0
|
This class implements the InputStream interface for reading bytes from a Binary variable. More...
#include <QC_BinaryInputStream.dox.h>
Public Member Methods | |
constructor (data src) | |
Creates the BinaryInputStream based on the Binary 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... | |
Public Member Methods inherited from Qore::InputStream | |
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... | |
Public Member Methods inherited from Qore::StreamBase | |
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... | |
This class implements the InputStream interface for reading bytes from a Binary variable.
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::BinaryInputStream::constructor | ( | data | src | ) |
Creates the BinaryInputStream based on the Binary given.
src | the Binary or string to read bytes from |
|
virtual |
Peeks the next byte available from the input stream; returns -1 if no more data available.
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 |
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.