SignDoc SDK (C++)  5.0.0
OutputStream Class Referenceabstract

Interface for an output stream, inspired by Java's java.io.OutputStream. More...

#include <SignDocSDK-cpp.h>

Inheritance diagram for OutputStream:
LibraryOutputStream UserOutputStream FileOutputStream MemoryOutputStream

Public Member Functions

 OutputStream (SIGNDOC_OutputStream *aImpl)
 Constructor. More...
 
virtual ~OutputStream ()
 Destructor. More...
 
virtual void close ()=0
 Close the stream. More...
 
virtual void flush ()=0
 Flush the stream. More...
 
virtual void seek (int aPos)=0
 Seek to the specified position. More...
 
virtual int tell () const =0
 Retrieve the current position. More...
 
virtual void write (const void *aSrc, int aLen)=0
 Write octets to the stream. More...
 
SIGNDOC_OutputStream * getImpl ()
 Internal. More...
 

Protected Attributes

SIGNDOC_OutputStream * p
 Pointer to C structure. More...
 

Detailed Description

Interface for an output stream, inspired by Java's java.io.OutputStream.

If you want to implement your own OutputStream implementation, derive your class from UserOutputStream.

Constructor & Destructor Documentation

OutputStream ( SIGNDOC_OutputStream *  aImpl)
inline

Constructor.

Parameters
[in]aImplA pointer to the C structure.
virtual ~OutputStream ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void close ( )
pure virtual

Close the stream.

This function forces any buffered data to be written and closes the stream.

You should not write to the stream after calling this function.

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

Implemented in LibraryOutputStream.

virtual void flush ( )
pure virtual

Flush the stream.

This function forces any buffered data to be written.

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

Implemented in LibraryOutputStream.

SIGNDOC_OutputStream* getImpl ( )
inline

Internal.

virtual void seek ( int  aPos)
pure virtual

Seek to the specified position.

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

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

Implemented in LibraryOutputStream.

virtual int tell ( ) const
pure virtual

Retrieve the current position.

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

Returns
The current position (the first octet is at position zero)

Implemented in LibraryOutputStream.

virtual void write ( const void *  aSrc,
int  aLen 
)
pure virtual

Write octets to the stream.

Throws an exception on error.

Parameters
[in]aSrcPointer to buffer to be written.
[in]aLenNumber of octets to write.

Implemented in LibraryOutputStream.

Field Documentation

SIGNDOC_OutputStream* p
protected

Pointer to C structure.


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