@UnstableApi public interface DnsResponse extends DnsMessage
限定符和类型 | 方法和说明 |
---|---|
DnsResponse |
addRecord(DnsSection section,
DnsRecord record)
Adds the specified
record at the end of the specified section of this DNS message. |
DnsResponse |
addRecord(DnsSection section,
int index,
DnsRecord record)
Adds the specified
record at the specified index of the specified section
of this DNS message. |
DnsResponse |
clear()
Removes all the records in this DNS message.
|
DnsResponse |
clear(DnsSection section)
Removes all the records in the specified
section of this DNS message. |
DnsResponseCode |
code()
Returns the 4 bit return code.
|
boolean |
isAuthoritativeAnswer()
Returns
true if responding server is authoritative for the domain
name in the query message. |
boolean |
isRecursionAvailable()
Returns
true if DNS server can handle recursive queries. |
boolean |
isTruncated()
Returns
true if response has been truncated, usually if it is
over 512 bytes. |
DnsResponse |
retain()
Increases the reference count by
1 . |
DnsResponse |
retain(int increment)
Increases the reference count by the specified
increment . |
DnsResponse |
setAuthoritativeAnswer(boolean authoritativeAnswer)
Set to
true if responding server is authoritative for the domain
name in the query message. |
DnsResponse |
setCode(DnsResponseCode code)
Sets the response code for this message.
|
DnsResponse |
setId(int id)
Sets the
ID of this DNS message. |
DnsResponse |
setOpCode(DnsOpCode opCode)
Sets the
opCode of this DNS message. |
DnsResponse |
setRecord(DnsSection section,
DnsRecord record)
Sets the specified
section of this DNS message to the specified record ,
making it a single-record section. |
DnsResponse |
setRecursionAvailable(boolean recursionAvailable)
Set to
true if DNS server can handle recursive queries. |
DnsResponse |
setRecursionDesired(boolean recursionDesired)
Sets the
RD (recursion desired} field of this DNS message. |
DnsResponse |
setTruncated(boolean truncated)
Set to
true if response has been truncated (usually happens for
responses over 512 bytes). |
DnsResponse |
setZ(int z)
Sets the
Z (reserved for future use) field of this DNS message. |
DnsResponse |
touch()
Records the current access location of this object for debugging purposes.
|
DnsResponse |
touch(java.lang.Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
count, count, id, isRecursionDesired, opCode, recordAt, recordAt, removeRecord, setRecord, z
refCnt, release, release
boolean isAuthoritativeAnswer()
true
if responding server is authoritative for the domain
name in the query message.DnsResponse setAuthoritativeAnswer(boolean authoritativeAnswer)
true
if responding server is authoritative for the domain
name in the query message.authoritativeAnswer
- flag for authoritative answerboolean isTruncated()
true
if response has been truncated, usually if it is
over 512 bytes.DnsResponse setTruncated(boolean truncated)
true
if response has been truncated (usually happens for
responses over 512 bytes).truncated
- flag for truncationboolean isRecursionAvailable()
true
if DNS server can handle recursive queries.DnsResponse setRecursionAvailable(boolean recursionAvailable)
true
if DNS server can handle recursive queries.recursionAvailable
- flag for recursion availabilityDnsResponseCode code()
DnsResponse setCode(DnsResponseCode code)
code
- the response codeDnsResponse setId(int id)
DnsMessage
ID
of this DNS message.setId
在接口中 DnsMessage
DnsResponse setOpCode(DnsOpCode opCode)
DnsMessage
opCode
of this DNS message.setOpCode
在接口中 DnsMessage
DnsResponse setRecursionDesired(boolean recursionDesired)
DnsMessage
RD
(recursion desired} field of this DNS message.setRecursionDesired
在接口中 DnsMessage
DnsResponse setZ(int z)
DnsMessage
Z
(reserved for future use) field of this DNS message.setZ
在接口中 DnsMessage
DnsResponse setRecord(DnsSection section, DnsRecord record)
DnsMessage
section
of this DNS message to the specified record
,
making it a single-record section. When the specified section
is DnsSection.QUESTION
,
the specified record
must be a DnsQuestion
.setRecord
在接口中 DnsMessage
DnsResponse addRecord(DnsSection section, DnsRecord record)
DnsMessage
record
at the end of the specified section
of this DNS message.
When the specified section
is DnsSection.QUESTION
, the specified record
must be a DnsQuestion
.addRecord
在接口中 DnsMessage
DnsResponse addRecord(DnsSection section, int index, DnsRecord record)
DnsMessage
record
at the specified index
of the specified section
of this DNS message. When the specified section
is DnsSection.QUESTION
, the specified
record
must be a DnsQuestion
.addRecord
在接口中 DnsMessage
DnsResponse clear(DnsSection section)
DnsMessage
section
of this DNS message.clear
在接口中 DnsMessage
DnsResponse clear()
DnsMessage
clear
在接口中 DnsMessage
DnsResponse touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
在接口中 DnsMessage
touch
在接口中 ReferenceCounted
DnsResponse touch(java.lang.Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
在接口中 DnsMessage
touch
在接口中 ReferenceCounted
DnsResponse retain()
ReferenceCounted
1
.retain
在接口中 DnsMessage
retain
在接口中 ReferenceCounted
DnsResponse retain(int increment)
ReferenceCounted
increment
.retain
在接口中 DnsMessage
retain
在接口中 ReferenceCounted