# Poco::Net

# class StringPartSource

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, stream

Inherited Functions: filename, 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

~StringPartSource();

Destroys the StringPartSource.

## Member Functions

### filename

const std::string & filename();

Returns the filename portion of the path.

See also: Poco::Net::PartSource::filename()

### stream

std::istream & stream();

Returns a string input stream for the string.

See also: Poco::Net::PartSource::stream()