diff options
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index fb764309bb0..c81d2aa552f 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -705,6 +705,25 @@ IceInternal::BasicStream::readBlob(Ice::Byte* v, Container::size_type sz) } void +IceInternal::BasicStream::readBlob(pair<const Byte*, const Byte*>& v, Int sz) +{ + if(sz > 0) + { + if(b.end() - i < sz) + { + throw UnmarshalOutOfBoundsException(__FILE__, __LINE__); + } + v.first = i; + v.second = i + sz; + i += sz; + } + else + { + v.first = v.second = 0; + } +} + +void IceInternal::BasicStream::write(const Byte* begin, const Byte* end) { Int sz = static_cast<Int>(end - begin); |