add eol, sol and next functions to Stream class