+ we should not do the string/integer end check inside
  the while(condition) body because then we read one
  more byte instead of breaking from the loop.

 + StringScanner always gets a read ahead byte from Stream Scanner