class Poco::Net::StringPartSource
Overview
An implementation of PartSource for strings. Moreā¦
#include <StringPartSource.h> class StringPartSource: public Poco::Net::PartSource { public: // construction StringPartSource(const std::string& str); StringPartSource( const std::string& str, const std::string& mediaType ); StringPartSource( const std::string& str, const std::string& mediaType, const std::string& filename ); // methods virtual std::istream& stream(); virtual const std::string& filename() const; virtual std::streamsize getContentLength() const; };
Inherited Members
public: // fields static const int UNKNOWN_CONTENT_LENGTH; // methods virtual std::istream& stream() = 0; virtual const std::string& filename() const; const std::string& mediaType() const; MessageHeader& headers(); const MessageHeader& headers() const; virtual std::streamsize getContentLength() const;
Detailed Documentation
An implementation of PartSource for strings.
Construction
StringPartSource(const std::string& str)
Creates the StringPartSource for the given string.
The MIME type is set to text/plain.
StringPartSource( const std::string& str, const std::string& mediaType )
Creates the StringPartSource for the given string and MIME type.
StringPartSource( const std::string& str, const std::string& mediaType, const std::string& filename )
Creates the StringPartSource for the given string, MIME type and filename.
Methods
virtual std::istream& stream()
Returns a string input stream for the string.
virtual const std::string& filename() const
Returns the filename portion of the path.
virtual std::streamsize getContentLength() const
Returns the string size.