public String read ( int count ) { if ( count < 0 ) throw new ParseException ( "use Rewind to seek back" ) ; int safecount = Math . min ( count , str . length ( ) - cursor ) ; if ( safecount == 0 && count > 0 ) throw new ParseException ( "no more data" ) ; String result = str . substring ( cursor , cursor + safecount ) ; cursor += safecount ; return result ; }
Read a number of characters .