add getRemain for line stream