add getRemaining method
[ecparse.git] / GrowingBuffer.cpp
index 719e793..b1c5dbc 100644 (file)
@@ -35,6 +35,10 @@ size_t GrowingBuffer::getSize() {
        return size;
 }
 
+size_t GrowingBuffer::getRemaining() {
+       return limit - position;
+}
+
 void GrowingBuffer::seek(size_t position) {
        this->position = (position > limit) ? limit : position;
        GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] setting position to %d.\n", __FILE__, __LINE__, position);