String
rrToString() {
	StringBuffer sb = new StringBuffer();
	sb.append(precedence);
	sb.append(" ");
	sb.append(gatewayType);
	sb.append(" ");
	sb.append(algorithmType);
	sb.append(" ");
	switch (gatewayType) {
	case Gateway.None:
		sb.append(".");
		break;
	case Gateway.IPv4:
	case Gateway.IPv6:
		InetAddress gatewayAddr = (InetAddress) gateway;
		sb.append(gatewayAddr.getHostAddress());
		break;
	case Gateway.Name:
		sb.append(gateway);
		break;
	}
	if (key != null) {
		sb.append(" ");
		sb.append(base64.toString(key));
	}
	return sb.toString();
}
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