public virtual int length() { while (!complete) { /* read until we reach EOF */ readInput(); } return len; }