Interface for an output stream, inspired by Java's java.io.OutputStream. More...
#include <SignDocSDK-cpp.h>
Public Member Functions | |
OutputStream (SIGNDOC_OutputStream *aImpl) | |
Constructor. | |
virtual | ~OutputStream () |
Destructor. | |
virtual void | close ()=0 |
Close the stream. | |
virtual void | flush ()=0 |
Flush the stream. | |
virtual void | seek (int aPos)=0 |
Seek to the specified position. | |
virtual int | tell () const =0 |
Retrieve the current position. | |
virtual void | write (const void *aSrc, int aLen)=0 |
Write octets to the stream. | |
SIGNDOC_OutputStream * | getImpl () |
Internal. | |
Protected Attributes | |
SIGNDOC_OutputStream * | p |
Pointer to C structure. |
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.
de::softpro::doc::OutputStream::OutputStream | ( | SIGNDOC_OutputStream * | aImpl ) | [inline] |
Constructor.
[in] | aImpl | A pointer to the C structure. |
virtual de::softpro::doc::OutputStream::~OutputStream | ( | ) | [inline, virtual] |
Destructor.
virtual void de::softpro::doc::OutputStream::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 de::softpro::doc::LibraryOutputStream.
virtual void de::softpro::doc::OutputStream::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 de::softpro::doc::LibraryOutputStream.
SIGNDOC_OutputStream* de::softpro::doc::OutputStream::getImpl | ( | ) | [inline] |
Internal.
virtual void de::softpro::doc::OutputStream::seek | ( | int | aPos ) | [pure virtual] |
Seek to the specified position.
Throws an exception if the position is invalid or if seeking is not supported.
[in] | aPos | The position (the first octet is at position zero). |
Implemented in de::softpro::doc::LibraryOutputStream.
virtual int de::softpro::doc::OutputStream::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.
Implemented in de::softpro::doc::LibraryOutputStream.
virtual void de::softpro::doc::OutputStream::write | ( | const void * | aSrc, |
int | aLen | ||
) | [pure virtual] |
Write octets to the stream.
Throws an exception on error.
[in] | aSrc | Pointer to buffer to be written. |
[in] | aLen | Number of octets to write. |
Implemented in de::softpro::doc::LibraryOutputStream.
SIGNDOC_OutputStream* de::softpro::doc::OutputStream::p [protected] |
Pointer to C structure.