code: public boolean consumeBoolean() throws ParsingException, IllegalStateException {
          if (completed) throwNoMoreContent();
          // Get the value from the current token ...
          String value = currentToken().value();
          try {
              boolean result = Boolean.parseBoolean(value);
              moveToNextToken();
              return result;
          } catch (NumberFormatException e) {
              Position position = currentToken().position();
              String msg = CommonI18n.expectingValidBooleanAtLineAndColumn.text(value, position.getLine(), position.getColumn());
              throw new ParsingException(position, msg);
          }
      }
docs: Convert the value of this token to an integer, return it, and move to the next token.
  
  @return the current token's value, converted to an integer
  @throws ParsingException if there is no such token to consume, or if the token cannot be converted to an integer
  @throws IllegalStateException if this method was called before the stream was {@link #start() started}