Interface for an input stream, inspired by Java's java.io.InputStream. More...
#include <SignDocSDK-cpp.h>
Public Member Functions | |
InputStream (SIGNDOC_InputStream *aImpl) | |
Constructor. | |
virtual | ~InputStream () |
Destructor. | |
virtual int | read (void *aDst, int aLen)=0 |
Read octets from source. | |
virtual void | close ()=0 |
Close the stream. | |
virtual void | seek (int aPos)=0 |
Seek to the specified position (int). | |
virtual int | tell () const =0 |
Retrieve the current position (int). | |
virtual int | getAvailable ()=0 |
Get an estimate of the number of octets available for reading. | |
SIGNDOC_InputStream * | getImpl () |
Internal. | |
Protected Attributes | |
SIGNDOC_InputStream * | p |
Pointer to C structure. |
Interface for an input stream, inspired by Java's java.io.InputStream.
If you want to implement your own InputStream implementation, derive your class from UserInputStream.
de::softpro::doc::InputStream::InputStream | ( | SIGNDOC_InputStream * | aImpl ) | [inline] |
Constructor.
[in] | aImpl | A pointer to the C structure. |
virtual de::softpro::doc::InputStream::~InputStream | ( | ) | [inline, virtual] |
Destructor.
virtual void de::softpro::doc::InputStream::close | ( | ) | [pure virtual] |
Close the stream.
Implementations of this class may define exceptions thrown by this function.
Implemented in de::softpro::doc::LibraryInputStream.
virtual int de::softpro::doc::InputStream::getAvailable | ( | ) | [pure virtual] |
Get an estimate of the number of octets available for reading.
Throws an exception if this function is not supported.
Implemented in de::softpro::doc::LibraryInputStream.
SIGNDOC_InputStream* de::softpro::doc::InputStream::getImpl | ( | ) | [inline] |
Internal.
virtual int de::softpro::doc::InputStream::read | ( | void * | aDst, |
int | aLen | ||
) | [pure virtual] |
Read octets from source.
Implementations of this class may define exceptions thrown by this function.
Once this function has returned a value smaller than aLen, end of input has been reached and further calls should return 0.
[out] | aDst | Pointer to buffer to be filled. |
[in] | aLen | Number of octets to read. |
Implemented in de::softpro::doc::LibraryInputStream.
virtual void de::softpro::doc::InputStream::seek | ( | int | aPos ) | [pure virtual] |
Seek to the specified position (int).
Throws an exception if the position is invalid or if seeking is not supported.
[in] | aPos | The position (zero being the first octet). |
Implemented in de::softpro::doc::LibraryInputStream.
virtual int de::softpro::doc::InputStream::tell | ( | ) | const [pure virtual] |
Retrieve the current position (int).
Throws an exception if the position cannot represented as non-negative int or if seeking is not supported.
Implemented in de::softpro::doc::LibraryInputStream.
SIGNDOC_InputStream* de::softpro::doc::InputStream::p [protected] |
Pointer to C structure.