javax.jmdns.impl
Class DNSOutgoing

java.lang.Object
  extended by javax.jmdns.impl.DNSMessage
      extended by javax.jmdns.impl.DNSOutgoing

public final class DNSOutgoing
extends DNSMessage

An outgoing DNS message.


Field Summary
static boolean USE_DOMAIN_NAME_COMPRESSION
          This can be used to turn off domain name compression.
 
Fields inherited from class javax.jmdns.impl.DNSMessage
_additionals, _answers, _authoritativeAnswers, _questions, MULTICAST, UNICAST
 
Constructor Summary
DNSOutgoing(int flags)
          Create an outgoing multicast query or response.
DNSOutgoing(int flags, boolean multicast)
          Create an outgoing query or response.
 
Method Summary
 void addAnswer(DNSRecord rec, long now)
          Add an answer to the message.
 void addAuthorativeAnswer(DNSRecord rec)
          Add an authorative answer to the message.
 void addQuestion(DNSQuestion rec)
          Add a question to the message.
 boolean isQuery()
          Check if the message is a query.
 java.lang.String toString()
           
 
Methods inherited from class javax.jmdns.impl.DNSMessage
getAdditionals, getAllAnswers, getAnswers, getAuthorities, getFlags, getId, getNumberOfAdditionals, getNumberOfAnswers, getNumberOfAuthorities, getNumberOfQuestions, getQuestions, isEmpty, isMulticast, isResponse, isTruncated, setFlags, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

USE_DOMAIN_NAME_COMPRESSION

public static boolean USE_DOMAIN_NAME_COMPRESSION
This can be used to turn off domain name compression. This was helpful for tracking problems interacting with other mdns implementations.

Constructor Detail

DNSOutgoing

public DNSOutgoing(int flags)
Create an outgoing multicast query or response.

Parameters:
flags -

DNSOutgoing

public DNSOutgoing(int flags,
                   boolean multicast)
Create an outgoing query or response.

Parameters:
flags -
multicast -
Method Detail

addQuestion

public void addQuestion(DNSQuestion rec)
                 throws java.io.IOException
Add a question to the message.

Parameters:
rec -
Throws:
java.io.IOException

addAnswer

public void addAnswer(DNSRecord rec,
                      long now)
               throws java.io.IOException
Add an answer to the message.

Parameters:
rec -
now -
Throws:
java.io.IOException

addAuthorativeAnswer

public void addAuthorativeAnswer(DNSRecord rec)
                          throws java.io.IOException
Add an authorative answer to the message.

Parameters:
rec -
Throws:
java.io.IOException

isQuery

public boolean isQuery()
Description copied from class: DNSMessage
Check if the message is a query.

Overrides:
isQuery in class DNSMessage
Returns:
true is the message is a query

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object