# Poco::Net

# class MultipartStreamBuf

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

## Description

This is the streambuf class used for reading from a multipart message stream.

## Inheritance

Direct Base Classes: Poco::BufferedStreamBuf

All Base Classes: Poco::BufferedStreamBuf

## Member Summary

Member Functions: lastPart, readFromDevice

## Constructors

### MultipartStreamBuf

MultipartStreamBuf(
std::istream & istr,
const std::string & boundary
);

Creates the MultipartStreamBuf and connects it to the given input stream.

### MultipartStreamBuf

MultipartStreamBuf(
std::istream & istr,
const std::string & boundary,
std::streamsize contentLength
);

Creates the MultipartStreamBuf with a known Content-Length for the current part, enabling bulk-read optimization.

## Destructor

### ~MultipartStreamBuf

~MultipartStreamBuf();

## Member Functions

### lastPart

bool lastPart() const;

### readFromDevice

std::streamsize readFromDevice(
char * buffer,
std::streamsize length
);