PoDoFo  0.9.4
Public Member Functions | List of all members
PoDoFo::PdfBufferOutputStream Class Reference

#include <PdfOutputStream.h>

Inheritance diagram for PoDoFo::PdfBufferOutputStream:
PoDoFo::PdfOutputStream

Public Member Functions

 PdfBufferOutputStream (PdfRefCountedBuffer *pBuffer)
 
virtual pdf_long Write (const char *pBuffer, pdf_long lLen)
 
virtual void Close ()
 
pdf_long GetLength () const
 
- Public Member Functions inherited from PoDoFo::PdfOutputStream
pdf_long Write (const std::string &s)
 

Detailed Description

An output stream that writes to a PdfRefCountedBuffer.

The PdfRefCountedBuffer is resized automatically if necessary.

Constructor & Destructor Documentation

PoDoFo::PdfBufferOutputStream::PdfBufferOutputStream ( PdfRefCountedBuffer pBuffer)
inline

Write to an already opened input device

Parameters
pBufferdata is written to this buffer

Member Function Documentation

virtual void PoDoFo::PdfBufferOutputStream::Close ( )
inlinevirtual

Close the PdfOutputStream. This method may throw exceptions and has to be called before the descructor to end writing.

No more data may be written to the output device after calling close.

Implements PoDoFo::PdfOutputStream.

pdf_long PoDoFo::PdfBufferOutputStream::GetLength ( ) const
inline
Returns
the length of the buffers contents
pdf_long PoDoFo::PdfBufferOutputStream::Write ( const char *  pBuffer,
pdf_long  lLen 
)
virtual

Write data to the output stream

Parameters
pBufferthe data is read from this buffer
lLenthe size of the buffer
Returns
the number of bytes written, -1 if an error ocurred

Implements PoDoFo::PdfOutputStream.