SignDoc SDK (C++)  5.0.0
LibraryInputStream Class Reference

Base class for InputStream implementations in SignDoc SDK. More...

#include <SignDocSDK-cpp.h>

Inheritance diagram for LibraryInputStream:
InputStream FileInputStream MemoryInputStream

Public Member Functions

 LibraryInputStream (SIGNDOC_InputStream *aImpl)
 Constructor. More...
 
virtual int read (void *aDst, int aLen)
 Read octets from source. More...
 
virtual void close ()
 Close the stream. More...
 
virtual void seek (int aPos)
 Seek to the specified position (int). More...
 
virtual int tell () const
 Retrieve the current position (int). More...
 
virtual int getAvailable ()
 Get an estimate of the number of octets available for reading. More...
 
- Public Member Functions inherited from InputStream
 InputStream (SIGNDOC_InputStream *aImpl)
 Constructor. More...
 
virtual ~InputStream ()
 Destructor. More...
 
SIGNDOC_InputStream * getImpl ()
 Internal. More...
 

Additional Inherited Members

- Protected Attributes inherited from InputStream
SIGNDOC_InputStream * p
 Pointer to C structure. More...
 

Detailed Description

Base class for InputStream implementations in SignDoc SDK.

Constructor & Destructor Documentation

LibraryInputStream ( SIGNDOC_InputStream *  aImpl)
inline

Constructor.

Parameters
[in]aImplA pointer to the C structure.

Member Function Documentation

virtual void close ( )
inlinevirtual

Close the stream.

Implementations of this class may define exceptions thrown by this function.

Implements InputStream.

virtual int getAvailable ( )
inlinevirtual

Get an estimate of the number of octets available for reading.

Throws an exception if this function is not supported.

Note
There may be more octets available than reported by this function, but never less. If there is at least one octet available for reading, the return value must be at least one. (That is, always returning zero is not possible.)
Returns
The minimum number of octets available for reading.

Implements InputStream.

virtual int read ( void *  aDst,
int  aLen 
)
inlinevirtual

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.

Parameters
[out]aDstPointer to buffer to be filled.
[in]aLenNumber of octets to read.
Returns
The number of octets read.

Implements InputStream.

virtual void seek ( int  aPos)
inlinevirtual

Seek to the specified position (int).

Throws an exception if the position is invalid or if seeking is not supported.

Parameters
[in]aPosThe position (zero being the first octet).

Implements InputStream.

virtual int tell ( ) const
inlinevirtual

Retrieve the current position (int).

Throws an exception if the position cannot represented as non-negative int or if seeking is not supported.

Returns
The current position (zero being the first octet)

Implements InputStream.


The documentation for this class was generated from the following file: