code: static PublicKey
  parseRecord(int alg, byte [] data) {
  	ByteArrayInputStream bytes = new ByteArrayInputStream(data); 
  	DataInputStream in = new DataInputStream(bytes);
  	try {
  		switch (alg) {
  			case DNSSEC.RSAMD5:
  			case DNSSEC.RSASHA1:
  			case DNSSEC.RSA_NSEC3_SHA1:
  				return parseRSA(in);
  			case DNSSEC.DH:
  				return parseDH(in);
  			case DNSSEC.DSA:
  			case DNSSEC.DSA_NSEC3_SHA1:
  				return parseDSA(in);
  			default:
  				return null;
  		}
  	}
  	catch (IOException e) {
  		if (Options.check("verboseexceptions"))
  			System.err.println(e);
  		return null;
  	}
  }
docs: Converts a KEY/DNSKEY record into a PublicKey