|
|||||||||
| 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)
Flagspublic void unsetFlag(int bit)
Flagspublic boolean getFlag(int bit)
Flagspublic int getID()
public void setID(int id)
public void setRcode(int value)
Rcodepublic int getRcode()
Rcodepublic void setOpcode(int value)
Opcodepublic int getOpcode()
Opcodepublic int getCount(int field)
Sectionpublic String printFlags()
public String toString()
toString in class Objectpublic Object clone()
clone in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||