diff options
author | Vincent Richard <[email protected]> | 2012-04-16 20:32:33 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2012-04-16 20:32:33 +0000 |
commit | 4f33877820edee1b47d1b6f4fc800eaad273adaa (patch) | |
tree | 10d5d339f17f2561ef46993de308c2e7d8a9fd79 /src/streamContentHandler.cpp | |
parent | Split stream.hpp/.cpp into multiple source files. (diff) | |
download | vmime-4f33877820edee1b47d1b6f4fc800eaad273adaa.tar.gz vmime-4f33877820edee1b47d1b6f4fc800eaad273adaa.zip |
Added ability to parse directly from an input stream (eg. file). This allows very big messages to be parsed without loading the whole message data into memory.
Diffstat (limited to 'src/streamContentHandler.cpp')
-rw-r--r-- | src/streamContentHandler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/streamContentHandler.cpp b/src/streamContentHandler.cpp index 89a36b4f..14837d26 100644 --- a/src/streamContentHandler.cpp +++ b/src/streamContentHandler.cpp @@ -25,6 +25,7 @@ #include "vmime/utility/outputStreamAdapter.hpp" #include "vmime/utility/inputStreamStringAdapter.hpp" +#include "vmime/utility/seekableInputStream.hpp" #include "vmime/utility/streamUtils.hpp" @@ -207,6 +208,9 @@ const vmime::encoding& streamContentHandler::getEncoding() const bool streamContentHandler::isBuffered() const { + if (m_stream.dynamicCast <utility::seekableInputStream>() != NULL) + return true; + // FIXME: some streams can be resetted return false; } |