From 4f33877820edee1b47d1b6f4fc800eaad273adaa Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 16 Apr 2012 22:32:33 +0200 Subject: 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. --- src/streamContentHandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/streamContentHandler.cpp') 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 () != NULL) + return true; + // FIXME: some streams can be resetted return false; } -- cgit v1.2.3