private static byte []
fromECDSAPublicKey(ECPublicKey key, ECKeyInfo keyinfo) {
	DNSOutput out = new DNSOutput();

	BigInteger x = key.getW().getAffineX();
	BigInteger y = key.getW().getAffineY();

	writePaddedBigInteger(out, x, keyinfo.length);
	writePaddedBigInteger(out, y, keyinfo.length);

	return out.toByteArray();
}
Converts a KEY/DNSKEY record into a PublicKey
src/main/java/core/org/xbill/DNS/DNSSEC.java