Class Poco::Net::PartHandler
Author: Applied Informatics Software Engineering GmbH and Contributors

# Poco::Net

# class PartHandler

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

## Description

The base class for all part or attachment handlers.

Part handlers are used for handling email parts and attachments in MIME multipart messages, as well as file uploads via HTML forms.

Subclasses must override handlePart().

## Inheritance

Known Derived Classes: NullPartHandler

## Member Summary

Member Functions: handlePart

## Constructors

### PartHandler

PartHandler();

Creates the PartHandler.

## Destructor

### ~PartHandler

virtual ~PartHandler();

Destroys the PartHandler.

## Member Functions

### handlePart

virtual void handlePart(
const MessageHeader & header,
std::istream & stream
) = 0;

Called for every part encountered during the processing of an email message or an uploaded HTML form.

Information about the part can be extracted from the given message header. What information can be obtained from header depends on the kind of part.

The content of the part can be read from stream.