Method Summary |
|
public void | addRecord(Record r, int section) Adds a record to a section of the Message, and adjusts the header. |
public Object | clone() Creates a copy of this Message. |
public boolean | findRRset(Name name, int type, int section) Determines if an RRset with the given name and type is already
present in the given section. |
public boolean | findRRset(Name name, int type) Determines if an RRset with the given name and type is already
present in any section. |
public boolean | findRecord(Record r, int section) Determines if the given record is already present in the given section. |
public boolean | findRecord(Record r) Determines if the given record is already present in any section. |
public Header | getHeader() Retrieves the Header. |
public OPTRecord | getOPT() Returns the OPT record from the ADDITIONAL section, if one is present. |
public Record | getQuestion() Returns the first record in the QUESTION section. |
public int | getRcode() Returns the message's rcode (error code). |
public Record[] | getSectionArray(int section) Returns an array containing all records in the given section, or an
empty array if the section is empty. |
public RRset[] | getSectionRRsets(int section) Returns an array containing all records in the given section grouped into
RRsets. |
public TSIGRecord | getTSIG() Returns the TSIG record from the ADDITIONAL section, if one is present. |
public boolean | isSigned() |
public boolean | isVerified() |
public static Message | newQuery(Record r) Creates a new Message with a random Message ID suitable for sending as a
query. |
public static Message | newUpdate(Name zone) Creates a new Message to contain a dynamic update. |
public int | numBytes() Returns the size of the message. |
public void | removeAllRecords(int section) Removes all records from a section of the Message, and adjusts the header. |
public boolean | removeRecord(Record r, int section) Removes a record from a section of the Message, and adjusts the header. |
public String | sectionToString(int i) Converts the given section of the Message to a String. |
public void | setHeader(Header h) Replaces the Header with a new one. |
public void | setTSIG(TSIG key, int error, TSIGRecord querytsig) Sets the TSIG key and other necessary information to sign a message. |
public String | toString() Converts the Message to a String. |
void | toWire(DNSOutput out) |
public byte[] | toWire() Returns an array containing the wire format representation of the Message. |
public byte[] | toWire(int maxLength) Returns an array containing the wire format representation of the Message
with the specified maximum length. |