Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

void PoDoFo::PdfHexFilter::DecodeBlockImpl ( const char *  pBuffer,
pdf_long  lLen 
) [virtual]

Real implementation of `DecodeBlock()'. NEVER call this method directly.

You must override this method to decode the buffer passed by the caller.

You are not obliged to immediately process any or all of the data in the passed buffer, but you must ensure that you have processed it and written it out by the end of EndDecodeImpl(). You must copy the buffer if you're going to store it, as ownership is not transferred to the filter and the caller may free the buffer at any time.

PdfFilter ensures that a valid stream is available when this method is called, ensures that BeginDecode() has been called, and ensures that EndDecode() has not been called since the last BeginDecode().

See also:

Implements PoDoFo::PdfFilter.

Definition at line 243 of file PdfFiltersPrivate.cpp.

References PoDoFo::PdfTokenizer::GetHexValue(), PoDoFo::PdfTokenizer::IsWhitespace(), and PoDoFo::PdfOutputStream::Write().

    char val;

    while( lLen-- ) 
        if( PdfTokenizer::IsWhitespace( *pBuffer ) )

        val  = PdfTokenizer::GetHexValue( *pBuffer );
        if( m_bLow ) 
            m_cDecodedByte = (val & 0x0F);
            m_bLow         = false;
            m_cDecodedByte = ((m_cDecodedByte << 4) | val);
            m_bLow         = true;

            GetStream()->Write( &m_cDecodedByte, 1 );


Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index