# Poco::Zip

# class PartialIOS

Library: Zip
Package: Zip
Header: Poco/Zip/PartialStream.h

## Description

The base class for PartialInputStream and PartialOutputStream.

This class is needed to ensure the correct initialization order of the stream buffer and base classes.

## Inheritance

Direct Base Classes: std::ios

All Base Classes: std::ios

Known Derived Classes: PartialInputStream, PartialOutputStream

## Member Summary

Member Functions: rdbuf

## Constructors

### PartialIOS

PartialIOS(
std::ostream & ostr,
std::size_t start,
std::size_t endPos,
bool initStream
);

Creates the basic stream and connects it to the given output stream. If initStream is true the status of the stream will be cleared on the first access. start and end acts as offset values for the written content. A start value greater than zero, means that the first bytes are not written but discarded instead, an end value not equal to zero means that the last end bytes are not written! Examples:

    start = 3; end = 1
    write("hello", 5) -> "l"

### PartialIOS

PartialIOS(
std::istream & istr,
std::ios::pos_type start,
std::ios::pos_type endPos,
const std::string & prefix,
const std::string & postfix,
bool initStream
);

Creates the basic stream and connects it to the given input stream. If initStream is true the status of the stream will be cleared on the first access, and the stream will be repositioned to position start

## Destructor

### ~PartialIOS

~PartialIOS();

Destroys the stream.

## Member Functions

### rdbuf

PartialStreamBuf * rdbuf();

Returns a pointer to the underlying streambuf.

## Variables

### _buf

PartialStreamBuf _buf;