diff options
author | Vincent Richard <[email protected]> | 2005-07-06 20:28:43 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-07-06 20:28:43 +0000 |
commit | 53f96cdb7514cab91f3c9ca204ec83cf6fc41664 (patch) | |
tree | 468f961f7649c968b93b663a773431afbbe4c904 /src/streamContentHandler.cpp | |
parent | 'depcomp' not used. (diff) | |
download | vmime-53f96cdb7514cab91f3c9ca204ec83cf6fc41664.tar.gz vmime-53f96cdb7514cab91f3c9ca204ec83cf6fc41664.zip |
Added contentHandler::extractRaw().
Diffstat (limited to 'src/streamContentHandler.cpp')
-rw-r--r-- | src/streamContentHandler.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/streamContentHandler.cpp b/src/streamContentHandler.cpp index 5da7ffba..c5f6145c 100644 --- a/src/streamContentHandler.cpp +++ b/src/streamContentHandler.cpp @@ -179,6 +179,20 @@ void streamContentHandler::extract(utility::outputStream& os) const } +void streamContentHandler::extractRaw(utility::outputStream& os) const +{ + if (m_stream == NULL && m_ownedStream.ptr() == NULL) + return; + + utility::inputStream& in = const_cast <utility::inputStream&> + (*(m_stream ? m_stream : m_ownedStream.ptr())); + + in.reset(); // may not work... + + utility::bufferedStreamCopy(in, os); +} + + const string::size_type streamContentHandler::getLength() const { return (m_length); |