docs: @Override
    public Result parse(Command cmd, InputStream input, ResultType type) throws SparqlException {
      BufferedReader br = null;
      try {
        // Expected type should already be validated by ResultFactory, check anyways.
        if (type != null && type != ResultType.ASK) {
          throw new SparqlException("Unexpected result type; expected " + type + " but found ASK.");
        }
        
        char[] buf = new char[BUFFER_LEN];
        
        // TODO: Find the actual encoding from the server response, if available.
        br = new BufferedReader(new InputStreamReader(input, UTF8));
        int len = fill(buf, br);
        
        String s = new String(buf, 0, len).trim();
        logger.debug("Read '{}' from text/html ASK result", s);
        
        boolean result;
        if (s.equalsIgnoreCase("true")) {
          result = true;
        } else if (s.equalsIgnoreCase("false")) {
          result = false;
        } else {
          logger.warn("Unexpected boolean value read from text/html ASK result: '{}'", s);
          result = false;
        }
        
        if (logger.isWarnEnabled() && br.read() >= 0) {
          logger.warn("Unexpected input found after boolean value");
        }
        
        return new BooleanResultImpl(cmd, result);
      } catch (IOException e) {
        throw new SparqlException("Error reading from server input", e);
      } finally {
        try {
          if (br != null) br.close();
          else input.close();
        } catch (IOException e) {
          // Don't re-throw because that could mask another exception (or prevent an otherwise usable
          // result from being returned).
          logger.warn("Error closing server input", e);
        }
      }
    }