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/utility/inputStreamByteBufferAdapter.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/utility/inputStreamByteBufferAdapter.cpp') diff --git a/src/utility/inputStreamByteBufferAdapter.cpp b/src/utility/inputStreamByteBufferAdapter.cpp index 92e779fe..907f1eec 100644 --- a/src/utility/inputStreamByteBufferAdapter.cpp +++ b/src/utility/inputStreamByteBufferAdapter.cpp @@ -85,6 +85,19 @@ stream::size_type inputStreamByteBufferAdapter::skip(const size_type count) } +stream::size_type inputStreamByteBufferAdapter::getPosition() const +{ + return m_pos; +} + + +void inputStreamByteBufferAdapter::seek(const size_type pos) +{ + if (pos <= m_length) + m_pos = pos; +} + + } // utility } // vmime -- cgit v1.2.3