void
rrFromWire(DNSInput in) throws IOException {
	elements = new ArrayList(1);
	while (in.remaining() != 0) {
		int family = in.readU16();
		int prefix = in.readU8();
		int length = in.readU8();
		boolean negative = (length & 0x80) != 0;
		length &= ~0x80;

		byte [] data = in.readByteArray(length);
		Element element;
		if (!validatePrefixLength(family, prefix)) {
			throw new WireParseException("invalid prefix length");
		}

		if (family == Address.IPv4 || family == Address.IPv6) {
			data = parseAddress(data,
					    Address.addressLength(family));
			InetAddress addr = InetAddress.getByAddress(data);
			element = new Element(negative, addr, prefix);
		} else {
			element = new Element(family, negative, data, prefix);
		}
		elements.add(element);

	}
}
Creates an APL Record from the given data.
@param elements The list of APL elements.
src/main/java/core/org/xbill/DNS/APLRecord.java