|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xbill.DNS.Header
public class 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 |
int |
getOpcode()
Retrieves the mesasge's opcode |
int |
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(int value)
Sets the message's opcode |
void |
setRcode(int 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.
IOException
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(int value)
Rcode
public int getRcode()
Rcode
public void setOpcode(int value)
Opcode
public int getOpcode()
Opcode
public int getCount(int field)
Section
public String printFlags()
public String toString()
toString
in class Object
public Object clone()
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |