|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xbill.DNS.Header
A DNS message header
Message
Field Summary | |
static int |
LENGTH
The length of a DNS Header in wire format. |
Constructor Summary | |
Header()
Create a new empty header with a random message id |
|
Header(byte[] b)
Creates a new Header from its DNS wire format representation |
|
Header(int id)
Create a new empty header. |
Method Summary | |
Object |
clone()
|
int |
getCount(int field)
Retrieves the record count for the given section |
boolean |
getFlag(int bit)
Retrieves a flag |
int |
getID()
Retrieves the message ID |
byte |
getOpcode()
Retrieves the mesasge's opcode |
short |
getRcode()
Retrieves the mesasge's rcode |
String |
printFlags()
Converts the header's flags into a String |
void |
setFlag(int bit)
Sets a flag to the supplied value |
void |
setID(int id)
Sets the message ID |
void |
setOpcode(byte value)
Sets the message's opcode |
void |
setRcode(short value)
Sets the message's rcode |
String |
toString()
Converts the header into a String |
byte[] |
toWire()
|
void |
unsetFlag(int bit)
Sets a flag to the supplied value |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int LENGTH
Constructor Detail |
public Header(int id)
id
- The message idpublic Header()
public Header(byte[] b) throws IOException
b
- A byte array containing the DNS Header.Method Detail |
public byte[] toWire()
public void setFlag(int bit)
Flags
public void unsetFlag(int bit)
Flags
public boolean getFlag(int bit)
Flags
public int getID()
public void setID(int id)
public void setRcode(short value)
Rcode
public short getRcode()
Rcode
public void setOpcode(byte value)
Opcode
public byte getOpcode()
Opcode
public int getCount(int field)
Section
public String printFlags()
public String toString()
public Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |