public bool hasMoreToFeed() { if (eof) return pendinglen > 0; else refillBuffer(); return pendinglen > 0; }