code: static private Result parseBooleanResult(Command cmd, XMLStreamReader rdr, 
        List<String> metadata) throws XMLStreamException, SparqlException {
      if (rdr.next() != CHARACTERS) {
        throw new SparqlException("Unexpected data in Boolean result: " + rdr.getEventType());
      }
      boolean result = Boolean.parseBoolean(rdr.getText());
      testClose(rdr, rdr.nextTag(), BOOLEAN, "Bad close of boolean element");
      cleanup(rdr);
      return new ProtocolBooleanResult(cmd, result, metadata);
    }
docs: Parses a boolean result from the reader. The reader is expected to be on the START_ELEMENT
  event for the opening <boolean> tag.
  @param cmd The command to associate with the result.
  @param rdr The XML reader from which to read the result.
  @param metadata The metadata to include in the result.
  @return The parsed result.