private static int
addressLength(byte [] addr) {
	for (int i = addr.length - 1; i >= 0; i--) {
		if (addr[i] != 0)
			return i + 1;
	}
	return 0;
}
Returns the list of APL elements.
src/main/java/core/org/xbill/DNS/APLRecord.java