VMime
stopSequenceFilteredInputStream< COUNT > Class Template Reference

#include <filteredStream.hpp>

Inheritance diagram for stopSequenceFilteredInputStream< COUNT >:
Collaboration diagram for stopSequenceFilteredInputStream< COUNT >:

Public Member Functions

 stopSequenceFilteredInputStream (inputStream &is, const byte_t *sequence)
 stopSequenceFilteredInputStream (inputStream &is, const char *sequence)
inputStreamgetPreviousInputStream ()
bool eof () const
void reset ()
size_t read (byte_t *const data, const size_t count)
size_t skip (const size_t)
size_t read (byte_t *const data, const size_t count)
size_t read (byte_t *const data, const size_t count)
Public Member Functions inherited from filteredInputStream
virtual size_t getBlockSize ()
Public Member Functions inherited from stream
virtual ~stream ()

Additional Inherited Members

Protected Member Functions inherited from object
 object ()
 object (const object &)
objectoperator= (const object &)
virtual ~object ()

Detailed Description

template<int COUNT>
class vmime::utility::stopSequenceFilteredInputStream< COUNT >

A filtered input stream which stops when a specified sequence is found (eof() method will return 'true').

Constructor & Destructor Documentation

◆ stopSequenceFilteredInputStream() [1/2]

template<int COUNT>
stopSequenceFilteredInputStream ( inputStream & is,
const byte_t * sequence )

Construct a new filter for the specified input stream.

Parameters
isstream from which to read data to be filtered
sequencesequence on which to stop

◆ stopSequenceFilteredInputStream() [2/2]

template<int COUNT>
stopSequenceFilteredInputStream ( inputStream & is,
const char * sequence )

Construct a new filter for the specified input stream.

Parameters
isstream from which to read data to be filtered
sequencesequence on which to stop

Member Function Documentation

◆ eof()

template<int COUNT>
bool eof ( ) const
virtual

Test for end of stream (no more data to read).

Returns
true if we have reached the end of stream, false otherwise

Implements inputStream.

Referenced by read().

◆ getPreviousInputStream()

template<int COUNT>
inputStream & getPreviousInputStream ( )
virtual

Return a reference to the stream being filtered.

Returns
stream being filtered

Implements filteredInputStream.

◆ read() [1/3]

size_t read ( byte_t *const data,
const size_t count )
virtual

Read data from the stream.

Parameters
datawill receive the data read
countmaximum number of bytes to read
Returns
number of bytes read

Implements inputStream.

References vmime::count(), vmime::end(), eof(), and read().

◆ read() [2/3]

size_t read ( byte_t *const data,
const size_t count )
virtual

Read data from the stream.

Parameters
datawill receive the data read
countmaximum number of bytes to read
Returns
number of bytes read

Implements inputStream.

References vmime::count().

◆ read() [3/3]

template<int COUNT>
size_t read ( byte_t *const data,
const size_t count )
virtual

Read data from the stream.

Parameters
datawill receive the data read
countmaximum number of bytes to read
Returns
number of bytes read

Implements inputStream.

References vmime::count(), vmime::end(), eof(), and read().

Referenced by read().

◆ reset()

template<int COUNT>
void reset ( )
virtual

Set the read pointer to the beginning of the stream.

Warning
WARNING: this may not work for all stream types.

Implements inputStream.

◆ skip()

template<int COUNT>
size_t skip ( const size_t count)
virtual

Skip a number of bytes.

Parameters
countmaximum number of bytes to ignore
Returns
number of bytes skipped

Implements inputStream.


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