private void parseToken(String token){
  int len=token.length();
  for (int i=0; i < len; i++) {
    int chr=sr.read();
    if (chr == -1) {
      throw new IllegalArgumentException("EOF reached while reading token: " + token);
    }
    chr=Character.toLowerCase((char)chr);
    int loTokenChar=token.charAt(i);
    if (loTokenChar != chr) {
      throw new IllegalArgumentException("Expected token: " + token + " at position "+ sr.getPosition());
    }
  }
}

private void parseToken ( String token ) { int len = token . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { int chr = sr . read ( ) ; if ( chr == - 1 ) { throw new IllegalArgumentException ( "EOF reached while reading token: " + token ) ; } chr = Character . toLowerCase ( ( char ) chr ) ; int loTokenChar = token . charAt ( i ) ; if ( loTokenChar != chr ) { throw new IllegalArgumentException ( "Expected token: " + token + " at position " + sr . getPosition ( ) ) ; } } }
return the specified token from the reader . if it is not found , throw an ioexception indicating that . converting to chr to ( char ) chr is acceptable because the ' tokens ' allowed in a json input stream ( true , false , null ) are all ascii .
