public int read(){
  if (next >= length) {
    return -1;
  }
  return str.charAt(next++);
}

public int read ( ) { if ( next >= length ) { return - 1 ; } return str . charAt ( next ++ ) ; }
reads a single character .
