void
rdataFromString(Tokenizer st, Name origin) throws IOException {
	elements = new ArrayList(1);
	while (true) {
		Tokenizer.Token t = st.get();
		if (!t.isString())
			break;

		boolean negative = false;
		int family = 0;
		int prefix = 0;

		String s = t.value;
		int start = 0;
		if (s.startsWith("!")) {
			negative = true;
			start = 1;
		}
		int colon = s.indexOf(':', start);
		if (colon < 0)
			throw st.exception("invalid address prefix element");
		int slash = s.indexOf('/', colon);
		if (slash < 0)
			throw st.exception("invalid address prefix element");

		String familyString = s.substring(start, colon);
		String addressString = s.substring(colon + 1, slash);
		String prefixString = s.substring(slash + 1);

		try {
			family = Integer.parseInt(familyString);
		}
		catch (NumberFormatException e) {
			throw st.exception("invalid family");
		}
		if (family != Address.IPv4 && family != Address.IPv6)
			throw st.exception("unknown family");

		try {
			prefix = Integer.parseInt(prefixString);
		}
		catch (NumberFormatException e) {
			throw st.exception("invalid prefix length");
		}

		if (!validatePrefixLength(family, prefix)) {
			throw st.exception("invalid prefix length");
		}

		byte [] bytes = Address.toByteArray(addressString, family);
		if (bytes == null)
			throw st.exception("invalid IP address " +
					   addressString);

		InetAddress address = InetAddress.getByAddress(bytes);
		elements.add(new Element(negative, address, prefix));
	}
	st.unget();
}
Creates an APL Record from the given data.
@param elements The list of APL elements.
src/main/java/core/org/xbill/DNS/APLRecord.java