pdfmm 0.9.20
Public Member Functions | List of all members
PdfFilteredDecodeStream Class Reference
Inheritance diagram for PdfFilteredDecodeStream:
mm::PdfOutputStream

Public Member Functions

 PdfFilteredDecodeStream (PdfOutputStream &outputStream, const PdfFilterType filterType, bool ownStream, const PdfDictionary *decodeParms=nullptr)
 
void WriteImpl (const char *buffer, size_t len) override
 
void Close () override
 
- Public Member Functions inherited from mm::PdfOutputStream
void Write (const char *buffer, size_t len)
 
void Write (const std::string_view &view)
 
virtual void Close ()=0
 

Detailed Description

Create a filter that is a PdfOutputStream.

All data written to this stream is decoded using a filter and written to another PdfOutputStream.

The passed output stream is owned by this PdfOutputStream and deleted along with it (optionally, see constructor).

Constructor & Destructor Documentation

◆ PdfFilteredDecodeStream()

PdfFilteredDecodeStream::PdfFilteredDecodeStream ( PdfOutputStream outputStream,
const PdfFilterType  filterType,
bool  ownStream,
const PdfDictionary decodeParms = nullptr 
)
inline

Create a filtered output stream.

All data written to this stream is decoded using the passed filter type and written to the passed output stream which will be deleted by this PdfFilteredDecodeStream if the parameter bOwnStream is true.

Parameters
outputStreamwrite all data to this output stream after decoding the data. The PdfOutputStream is deleted along with this object if bOwnStream is true.
filterTypeuse this filter for decoding.
ownStreamif true outputStream will be deleted along with this stream
decodeParmsadditional parameters for decoding

Member Function Documentation

◆ Close()

void PdfFilteredDecodeStream::Close ( )
inlineoverridevirtual

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

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

Implements mm::PdfOutputStream.

◆ WriteImpl()

void PdfFilteredDecodeStream::WriteImpl ( const char *  buffer,
size_t  len 
)
inlineoverridevirtual

Write data to the output stream

Parameters
bufferthe data is read from this buffer
lenthe size of the buffer

Implements mm::PdfOutputStream.