public abstract class DNSMessage extends Object
Modifier and Type | Field and Description |
---|---|
protected List<DNSRecord> |
_additionals |
protected List<DNSRecord> |
_answers |
protected List<DNSRecord> |
_authoritativeAnswers |
protected List<DNSQuestion> |
_questions |
static boolean |
MULTICAST |
static boolean |
UNICAST |
Modifier | Constructor and Description |
---|---|
protected |
DNSMessage(int flags,
int id,
boolean multicast) |
Modifier and Type | Method and Description |
---|---|
Collection<? extends DNSRecord> |
getAdditionals() |
Collection<? extends DNSRecord> |
getAllAnswers() |
Collection<? extends DNSRecord> |
getAnswers() |
Collection<? extends DNSRecord> |
getAuthorities() |
int |
getFlags() |
int |
getId() |
int |
getNumberOfAdditionals() |
int |
getNumberOfAnswers() |
int |
getNumberOfAuthorities() |
int |
getNumberOfQuestions() |
Collection<? extends DNSQuestion> |
getQuestions() |
boolean |
isEmpty()
Check if the message is empty
|
boolean |
isMulticast() |
boolean |
isQuery()
Check if the message is a query.
|
boolean |
isResponse()
Check if the message is a response.
|
boolean |
isTruncated()
Check if the message is truncated.
|
protected String |
print(byte[] data)
Debugging.
|
void |
setFlags(int flags) |
void |
setId(int id) |
public static final boolean MULTICAST
public static final boolean UNICAST
protected final List<DNSQuestion> _questions
protected DNSMessage(int flags, int id, boolean multicast)
flags
- id
- multicast
- public int getId()
public void setId(int id)
id
- the id to setpublic int getFlags()
public void setFlags(int flags)
flags
- the flags to setpublic boolean isMulticast()
public Collection<? extends DNSQuestion> getQuestions()
public int getNumberOfQuestions()
public Collection<? extends DNSRecord> getAllAnswers()
public Collection<? extends DNSRecord> getAnswers()
public int getNumberOfAnswers()
public Collection<? extends DNSRecord> getAuthorities()
public int getNumberOfAuthorities()
public Collection<? extends DNSRecord> getAdditionals()
public int getNumberOfAdditionals()
public boolean isTruncated()
public boolean isQuery()
public boolean isResponse()
public boolean isEmpty()
protected String print(byte[] data)
data
- Copyright © 2002–2018 JmDNS. All rights reserved.