@Table(value="dnsrecord") public class DNSRecord extends Object
| Constructor and Description |
|---|
DNSRecord() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object ob) |
static DNSRecord |
fromWire(byte[] data)
Converts a raw wire transfer format of a record to a DNS record.
|
LocalDateTime |
getCreateTime()
Gets the date/time the record was created.
|
byte[] |
getData()
Get the rdata of the record.
|
int |
getDclass()
Gets the DNS record class such as IN, HS, and CH.
|
Long |
getId()
Gets the internal id of the record.
|
String |
getName()
Gets the name associated with this DNS entry.
|
long |
getTtl()
Gets the record time to live in seconds.
|
int |
getType()
Gets the type of the DNS record such as A, SRV, CERT, MX, and SOA.
|
void |
setCreateTime(LocalDateTime timestamp)
Sets the date/time the record was created.
|
void |
setData(byte[] data)
Sets the rdata of the record.
|
void |
setDclass(int dclass)
Sets the DNS record class.
|
void |
setId(Long id)
Sets the internal id of the record.
|
void |
setName(String name)
Sets the name associated with this DNS entry.
|
void |
setTtl(long ttl)
Sets the record time to live in seconds.
|
void |
setType(int type)
Gets the type of the DNS record such as A, SRV, CERT, MX, and SOA.
|
static byte[] |
toWire(DNSRecord rec)
Converts a DNS record to a raw wire transfer format.
|
public Long getId()
public void setId(Long id)
id - The internal id of the record.public String getName()
public void setName(String name)
name - The name associated with this DNS entry.public int getType()
public void setType(int type)
type - The type of the DNS record.public int getDclass()
public void setDclass(int dclass)
dclass - The DNS record class.public long getTtl()
public void setTtl(long ttl)
ttl - The record time to live in seconds.public LocalDateTime getCreateTime()
public void setCreateTime(LocalDateTime timestamp)
timestamp - The date/time the record was created.public byte[] getData()
public void setData(byte[] data)
data - The rdata of the record.public static DNSRecord fromWire(byte[] data) throws IOException
data - The raw byte stream of a record in wire transfer format.IOExceptionpublic static byte[] toWire(DNSRecord rec) throws IOException
rec - The DNSRecord to convert.IOExceptionCopyright © 2020. All rights reserved.