File Information
Library: Zip
Package: Zip
Header: Poco/Zip/PartialStream.h
Description
A PartialStreamBuf is a class that limits one view on an inputstream to a selected view range
Inheritance
Direct Base Classes: Poco::BufferedStreamBuf
All Base Classes: Poco::BufferedStreamBuf
Member Summary
Member Functions: bytesWritten, close, readFromDevice, writeToDevice
Constructors
PartialStreamBuf
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
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
Destructor
~PartialStreamBuf
~PartialStreamBuf();
Destroys the PartialStream.
Member Functions
bytesWritten
Poco::UInt64 bytesWritten() const;
close
void close();
Flushes a writing streambuf
readFromDevice
int readFromDevice(
char * buffer,
std::streamsize length
);
writeToDevice
int writeToDevice(
const char * buffer,
std::streamsize length
);