private static Record []
lookupHostName(String name, boolean all) throws UnknownHostException {
	try {
		Lookup lookup = new Lookup(name, Type.A);
		Record [] a = lookup.run();
		if (a == null) {
			if (lookup.getResult() == Lookup.TYPE_NOT_FOUND) {
				Record [] aaaa = new Lookup(name, Type.AAAA).run();
				if (aaaa != null)
					return aaaa;
			}
			throw new UnknownHostException("unknown host");
		}
		if (! all)
			return a;
		Record [] aaaa = new Lookup(name, Type.AAAA).run();
		if (aaaa == null)
			return a;
		Record [] merged = new Record[a.length + aaaa.length];
		System.arraycopy(a, 0, merged, 0, a.length);
		System.arraycopy(aaaa, 0, merged, a.length, aaaa.length);
		return merged;
	}
	catch (TextParseException e) {
		throw new UnknownHostException("invalid name");
	}
}
Converts an int array containing an IPv4 address into a dotted quad string.
@param addr The array
@return The string representation
src/main/java/core/org/xbill/DNS/Address.java