code: public static dnskey[] get(nitro_service service, String keyname[]) throws Exception{
  		if (keyname !=null && keyname.length>0) {
  			dnskey response[] = new dnskey[keyname.length];
  			dnskey obj[] = new dnskey[keyname.length];
  			for (int i=0;i<keyname.length;i++) {
  				obj[i] = new dnskey();
  				obj[i].set_keyname(keyname[i]);
  				response[i] = (dnskey) obj[i].get_resource(service);
  			}
  			return response;
  		}
  		return null;
  	}
docs: Use this API to fetch dnskey resources of given names .