public WriteSession clear()
    {
        tail = head.clear();
        size = 0;
        return this;
    }
The buffer will be cleared (tail will point to the head) and the size will be reset to zero.
protostuff-api/src/main/java/io/protostuff/WriteSession.java