T
- specific type of resource data (String, IpAddress, byte[])public static class Dns.ResRecord<T> extends Dns.Record
Constructor and Description |
---|
ResRecord(String name,
Dns.RecordType recType,
Dns.ClassType clsType,
long ttl,
T data)
Constructs a resource record.
|
ResRecord(String name,
Dns.RecordType recType,
long ttl,
T data)
Constructs a resource record with
Dns.ClassType.INTERNET . |
Modifier and Type | Method and Description |
---|---|
T |
data()
Returns the resource data or null if not supported.
|
String |
toString() |
long |
ttl()
Returns the number of seconds the resource can be cached (TTL).
|
public ResRecord(String name, Dns.RecordType recType, Dns.ClassType clsType, long ttl, T data)
name
- the domain name that was queriedrecType
- the record typeclsType
- the class typettl
- the number of seconds the resource can be cacheddata
- the resource data, can be nullpublic ResRecord(String name, Dns.RecordType recType, long ttl, T data)
Dns.ClassType.INTERNET
.name
- the domain name that was queriedrecType
- the record type.ttl
- the number of seconds the resource can be cached.data
- the resource data, can be nullpublic long ttl()
public T data()
public String toString()
toString
in class Dns.Record
Copyright © 2016. All Rights Reserved.