void
rdataFromString(Tokenizer st, Name origin) throws IOException {
	precedence = st.getUInt8();
	gatewayType = st.getUInt8();
	algorithmType = st.getUInt8();
	switch (gatewayType) {
	case Gateway.None:
		String s = st.getString();
		if (!s.equals("."))
			throw new TextParseException("invalid gateway format");
		gateway = null;
		break;
	case Gateway.IPv4:
		gateway = st.getAddress(Address.IPv4);
		break;
	case Gateway.IPv6:
		gateway = st.getAddress(Address.IPv6);
		break;
	case Gateway.Name:
		gateway = st.getName(origin);
		break;
	default:
		throw new WireParseException("invalid gateway type");
	}
	key = st.getBase64(false);
}
Creates an IPSECKEY Record from the given data.
@param precedence The record's precedence.
@param gatewayType The record's gateway type.
@param algorithmType The record's algorithm type.
@param gateway The record's gateway.
@param key The record's public key.
src/main/java/core/org/xbill/DNS/IPSECKEYRecord.java