public class Question extends Object
| Constructor and Description |
|---|
Question(String name,
Record.TYPE type)
Create a dns question for the given name/type/IN (internet class).
|
Question(String name,
Record.TYPE type,
Record.CLASS clazz)
Create a dns question for the given name/type/class.
|
Question(String name,
Record.TYPE type,
Record.CLASS clazz,
boolean unicastQuery)
Create a dns question for the given name/type/class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
Record.CLASS |
getClazz()
Retrieve the class of this dns question (usually internet).
|
String |
getName()
Retrieve the name of this dns question (e.g.
|
Record.TYPE |
getType()
Retrieve the type of this question.
|
int |
hashCode() |
static Question |
parse(DataInputStream dis,
byte[] data)
Parse a byte array and rebuild the dns question from it.
|
byte[] |
toByteArray()
Generate a binary paket for this dns question.
|
String |
toString() |
public Question(String name, Record.TYPE type, Record.CLASS clazz, boolean unicastQuery)
name - The name e.g. "measite.de".type - The type, e.g. A.clazz - The class, usually IN (internet).public Question(String name, Record.TYPE type, Record.CLASS clazz)
name - The name e.g. "measite.de".type - The type, e.g. A.clazz - The class, usually IN (internet).public Question(String name, Record.TYPE type)
name - The name e.g. "measite.de".type - The type, e.g. A.public Record.TYPE getType()
public Record.CLASS getClazz()
public String getName()
public static Question parse(DataInputStream dis, byte[] data) throws IOException
dis - The input stream.data - The plain data (for dns name references).IOException - On errors (read outside of packet).public byte[] toByteArray()
Copyright © 2014–2015. All rights reserved.