Poco::Zip

class PartialOutputStream

File Information

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

Description

This stream copies all characters written to it to one or multiple output streams.

Inheritance

Direct Base Classes: PartialIOS, std::ostream

All Base Classes: PartialIOS, std::ios, std::ostream

Member Summary

Member Functions: bytesWritten, close

Inherited Functions: rdbuf

Constructors

PartialOutputStream

PartialOutputStream(
    std::ostream & ostr,
    std::size_t start,
    std::size_t end,
    bool initStream = true
);

Creates the PartialOutputStream and connects it to the given output stream. Bytes written are guaranteed to be in the range [start, realEnd - end]. 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"

start = 3; end = 0
write("hello", 5) -> "lo"

Destructor

~PartialOutputStream

~PartialOutputStream();

Destroys the PartialOutputStream.

Member Functions

bytesWritten inline

Poco::UInt64 bytesWritten() const;

Returns the number of bytes actually forwarded to the inner ostream

close inline

void close();

must be called for the stream to properly terminate it

Securely control IoT edge devices from anywhere   Connect a Device