public boolean nextBoolean() throws IOException {
    int p = peeked;
    if (p == PEEKED_NONE) {
      p = doPeek();
    }
    if (p == PEEKED_TRUE) {
      peeked = PEEKED_NONE;
      pathIndices[stackSize - 1]++;
      return true;
    } else if (p == PEEKED_FALSE) {
      peeked = PEEKED_NONE;
      pathIndices[stackSize - 1]++;
      return false;
    }
    throw new IllegalStateException("Expected a boolean but was " + peek()
        + " at line " + getLineNumber() + " column " + getColumnNumber() + " path " + getPath());
  }
public boolean nextBoolean ( ) throws IOException { int p = peeked ; if ( p == PEEKED_NONE ) { p = doPeek ( ) ; } if ( p == PEEKED_TRUE ) { peeked = PEEKED_NONE ; pathIndices [ stackSize - 1 ] ++ ; return true ; } else if ( p == PEEKED_FALSE ) { peeked = PEEKED_NONE ; pathIndices [ stackSize - 1 ] ++ ; return false ; } throw new IllegalStateException ( "Expected a boolean but was " + peek ( ) + " at line " + getLineNumber ( ) + " column " + getColumnNumber ( ) + " path " + getPath ( ) ) ; }
Returns the {@link com.carrotsearch.ant.tasks.junit4.gson.stream.JsonToken#BOOLEAN boolean} value of the next token,
consuming it.

@throws IllegalStateException if the next token is not a boolean or if
this reader is closed.