Library: Zip
Package: Zip
Header: Poco/Zip/PartialStream.h
A PartialStreamBuf is a class that limits one view on an inputstream to a selected view range
Direct Base Classes: Poco::BufferedStreamBuf
All Base Classes: Poco::BufferedStreamBuf
Member Functions: bytesWritten, close, readFromDevice, writeToDevice
PartialStreamBuf(
std::ostream & out,
std::size_t start,
std::size_t end,
bool initStream
);
Creates the PartialStream. 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"
PartialStreamBuf(
std::istream & in,
std::ios::pos_type start,
std::ios::pos_type end,
const std::string & prefix,
const std::string & postfix,
bool initStream
);
Creates the PartialStream. 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
~PartialStreamBuf();
Destroys the PartialStream.
Poco::UInt64 bytesWritten() const;
void close();
Flushes a writing streambuf
int readFromDevice(
char * buffer,
std::streamsize length
);
int writeToDevice(
const char * buffer,
std::streamsize length
);