public final class DNSOutgoing extends DNSMessage
Modifier and Type | Class and Description |
---|---|
static class |
DNSOutgoing.MessageOutputStream |
Modifier and Type | Field and Description |
---|---|
static boolean |
USE_DOMAIN_NAME_COMPRESSION
This can be used to turn off domain name compression.
|
_additionals, _answers, _authoritativeAnswers, _questions, MULTICAST, UNICAST
Constructor and Description |
---|
DNSOutgoing(int flags)
Create an outgoing multicast query or response.
|
DNSOutgoing(int flags,
boolean multicast)
Create an outgoing query or response.
|
DNSOutgoing(int flags,
boolean multicast,
int senderUDPPayload)
Create an outgoing query or response.
|
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalAnswer(DNSIncoming in,
DNSRecord rec)
Add an additional answer to the record.
|
void |
addAnswer(DNSIncoming in,
DNSRecord rec)
Add an answer if it is not suppressed.
|
void |
addAnswer(DNSRecord rec,
long now)
Add an answer to the message.
|
void |
addAuthorativeAnswer(DNSRecord rec)
Add an authoritative answer to the message.
|
void |
addQuestion(DNSQuestion rec)
Add a question to the message.
|
int |
availableSpace()
Return the number of byte available in the message.
|
byte[] |
data()
Builds the final message buffer to be send and returns it.
|
int |
getMaxUDPPayload() |
boolean |
isQuery()
Check if the message is a query.
|
String |
toString() |
getAdditionals, getAllAnswers, getAnswers, getAuthorities, getFlags, getId, getNumberOfAdditionals, getNumberOfAnswers, getNumberOfAuthorities, getNumberOfQuestions, getQuestions, isEmpty, isMulticast, isResponse, isTruncated, print, setFlags, setId
public static boolean USE_DOMAIN_NAME_COMPRESSION
public DNSOutgoing(int flags)
flags
- public DNSOutgoing(int flags, boolean multicast)
flags
- multicast
- public DNSOutgoing(int flags, boolean multicast, int senderUDPPayload)
flags
- multicast
- senderUDPPayload
- The sender's UDP payload size is the number of bytes of the largest UDP payload that can be reassembled and delivered in the sender's network stack.public int availableSpace()
public void addQuestion(DNSQuestion rec) throws IOException
rec
- IOException
public void addAnswer(DNSIncoming in, DNSRecord rec) throws IOException
in
- rec
- IOException
public void addAnswer(DNSRecord rec, long now) throws IOException
rec
- now
- IOException
public void addAuthorativeAnswer(DNSRecord rec) throws IOException
rec
- IOException
public void addAdditionalAnswer(DNSIncoming in, DNSRecord rec) throws IOException
in
- rec
- IOException
public byte[] data()
public boolean isQuery()
DNSMessage
isQuery
in class DNSMessage
public int getMaxUDPPayload()
Copyright © 2002-2017 JmDNS. All Rights Reserved.