dnsjava - Create new Record

414 Views Asked by At

I am assigned a task to update the zone files. And I found dnsjava. However, when using it to add a new Record, I am successfully creating new records using the classes NSRecord, ARecord. But since there are many such classes, can I use Record class to create new record and add it to the zone file.

Using NSRecord, i am able to create a new record using

nsRecord = new NSRecord(domainName, dClass, ttl, target);

where target is the Name type nameserver.

Record class has the newRecord method to create a new Record, here. But I don't know what the last parameter "data" or type byte[] is and what it does. Also how do I add nameserver values to the record to save to the file.

0

There are 0 best solutions below