summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/StreamI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/StreamI.cpp')
-rw-r--r--cpp/src/Ice/StreamI.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/cpp/src/Ice/StreamI.cpp b/cpp/src/Ice/StreamI.cpp
index c0006b817c0..c347c653f5a 100644
--- a/cpp/src/Ice/StreamI.cpp
+++ b/cpp/src/Ice/StreamI.cpp
@@ -327,6 +327,13 @@ Ice::InputStreamI::readPendingObjects()
_is->readPendingObjects();
}
+void
+Ice::InputStreamI::rewind()
+{
+ _is->clear();
+ _is->i = _is->b.begin();
+}
+
//
// OutputStreamI
//
@@ -631,6 +638,23 @@ Ice::OutputStreamI::finished(vector<Byte>& bytes)
vector<Byte>(_os->b.begin(), _os->b.end()).swap(bytes);
}
+void
+Ice::OutputStreamI::reset(bool clearBuffer)
+{
+ _os->clear();
+
+ if(clearBuffer)
+ {
+ _os->b.clear();
+ }
+ else
+ {
+ _os->b.reset();
+ }
+
+ _os->i = _os->b.begin();
+}
+
//
// ObjectReader
//