Poco::Net

class StringPartSource

File Information

Library: Net
Package: Messages
Header: Poco/Net/StringPartSource.h

Description

An implementation of PartSource for strings.

Inheritance

Direct Base Classes: PartSource

All Base Classes: PartSource

Member Summary

Member Functions: filename, getContentLength, stream

Inherited Functions: filename, getContentLength, headers, mediaType, stream

Constructors

StringPartSource

StringPartSource(
    const std::string & str
);

Creates the StringPartSource for the given string.

The MIME type is set to text/plain.

StringPartSource

StringPartSource(
    const std::string & str,
    const std::string & mediaType
);

Creates the StringPartSource for the given string and MIME type.

StringPartSource

StringPartSource(
    const std::string & str,
    const std::string & mediaType,
    const std::string & filename
);

Creates the StringPartSource for the given string, MIME type and filename.

Destructor

~StringPartSource virtual

~StringPartSource();

Destroys the StringPartSource.

Member Functions

filename virtual

const std::string & filename() const;

Returns the filename portion of the path.

getContentLength virtual

std::streamsize getContentLength() const;

Returns the string size.

stream virtual

std::istream & stream();

Returns a string input stream for the string.