private void
processResponse(Name name, SetResponse response) {
	if (response.isSuccessful()) {
		RRset [] rrsets = response.answers();
		List l = new ArrayList();
		Iterator it;
		int i;

		for (i = 0; i < rrsets.length; i++) {
			it = rrsets[i].rrs();
			while (it.hasNext())
				l.add(it.next());
		}

		result = SUCCESSFUL;
		answers = (Record []) l.toArray(new Record[l.size()]);
		done = true;
	} else if (response.isNXDOMAIN()) {
		nxdomain = true;
		doneCurrent = true;
		if (iterations > 0) {
			result = HOST_NOT_FOUND;
			done = true;
		}
	} else if (response.isNXRRSET()) {
		result = TYPE_NOT_FOUND;
		answers = null;
		done = true;
	} else if (response.isCNAME()) {
		CNAMERecord cname = response.getCNAME();
		follow(cname.getTarget(), name);
	} else if (response.isDNAME()) {
		DNAMERecord dname = response.getDNAME();
		try {
			follow(name.fromDNAME(dname), name);
		} catch (NameTooLongException e) {
			result = UNRECOVERABLE;
			error = "Invalid DNAME target";
			done = true;
		}
	} else if (response.isDelegation()) {
		// We shouldn't get a referral.  Ignore it.
		referral = true;
	}
}
Sets the minimum credibility level that will be accepted when performing
the lookup.  This defaults to Credibility.NORMAL.
@param credibility The minimum credibility level.
src/main/java/core/org/xbill/DNS/Lookup.java