#include <iostreams.h>
Interface for input streams. It allows to read data from streams. This interface needs to be implemented for each protocol.
Public Member Functions | |
MAXON_METHOD Result< Int64 > | BytesAvailable () const |
MAXON_FUNCTION Result< void > | Read (const Block< Byte > &data) |
MAXON_METHOD Result< Int > | ReadEOS (const Block< Byte > &data) |
MAXON_METHOD Result< void > | Skip (Int64 bytes) |
MAXON_DECLARATION_CLASS (Factory< InputStreamRef(const Block< const Char > &, Bool)>, FromBlock, "net.maxon.inputstreaminterface.fromblock") | |
Private Member Functions | |
MAXON_INTERFACE (InputStreamInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.inputstream") | |
|
private |
MAXON_METHOD Result<Int64> BytesAvailable | ( | ) | const |
Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream.
MAXON_FUNCTION Result<void> Read | ( | const Block< Byte > & | data | ) |
Reads all bytes up to len bytes of data from the input stream into an array of bytes. 'bytes' and the result are of type Int (not Int64) as 'buffer' can never hold more bytes on a 32-bit system.
[out] | data | Buffer which receives the read bytes. |
MAXON_METHOD Result<Int> ReadEOS | ( | const Block< Byte > & | data | ) |
Reads up to len bytes of data from the input stream into an array of bytes. 'bytes' and the result are of type Int (not Int64) as 'buffer' can never hold more bytes on a 32-bit system.
[out] | data | Buffer which receives the read bytes. |
MAXON_METHOD Result<void> Skip | ( | Int64 | bytes | ) |
Skips over and discards n bytes of data from this input stream. If you want to Seek() forward Skip is the preferred method to call from the performance perspective.
[in] | bytes | Number of bytes to skip from the current position. |