| java.lang.Object org.apache.harmony.jndi.provider.dns.Message
Message | public class Message (Code) | | This class represents a domain protocol message.
See Also: RFC See Also: 1035 |
Constructor Summary | |
public | Message() | public | Message(int id, boolean qr, int opCode, boolean aa, boolean tc, boolean rd, boolean ra, int rCode, int qdCount, int anCount, int nsCount, int arCount) |
Message | public Message(int id, boolean qr, int opCode, boolean aa, boolean tc, boolean rd, boolean ra, int rCode, int qdCount, int anCount, int nsCount, int arCount)(Code) | | Constructs Message object from given parameters
Parameters: id - ID Parameters: qr - QR Parameters: opCode - OPCODE Parameters: aa - AA Parameters: tc - TC Parameters: rd - RA Parameters: ra - RA Parameters: rCode - RCODE Parameters: qdCount - QDCOUNT Parameters: anCount - ANCOUNT Parameters: nsCount - NSCOUNT Parameters: arCount - ARCOUNT |
addAdditionalRR | public void addAdditionalRR(ResourceRecord rr)(Code) | | Adds a new question record to the message.
Parameters: rr - a record to add |
addAnswerRR | public void addAnswerRR(ResourceRecord rr)(Code) | | Adds a new question record to the message.
Parameters: rr - a record to add |
addAuthorityRR | public void addAuthorityRR(ResourceRecord rr)(Code) | | Adds a new question record to the message.
Parameters: rr - a record to add |
addQuestionRecord | public void addQuestionRecord(QuestionRecord qr)(Code) | | Adds a new question record to the message.
Parameters: qr - a record to add |
getANCount | public int getANCount()(Code) | | Returns the anCount. |
getARCount | public int getARCount()(Code) | | Returns the arCount. |
getId | public int getId()(Code) | | Returns the id. |
getNSCount | public int getNSCount()(Code) | | Returns the nsCount. |
getOpCode | public int getOpCode()(Code) | | Returns the opCode. |
getQDCount | public int getQDCount()(Code) | | Returns the qdCount. |
getQR | public boolean getQR()(Code) | | Returns the QR. |
getRCode | public int getRCode()(Code) | | Returns the rCode. |
isAA | public boolean isAA()(Code) | | Returns the AA. |
isRA | public boolean isRA()(Code) | | Returns the RA. |
isRD | public boolean isRD()(Code) | | Returns the RD. |
isTc | public boolean isTc()(Code) | | Returns the TC. |
parseMessage | public static int parseMessage(byte[] mesBytes, int startIdx, Message mesObj) throws DomainProtocolException(Code) | | Parses given sequence of bytes and constructs a message object from it.
Parameters: mesBytes - the byte array that should be parsed Parameters: startIdx - an index of mesBytes array to start the parsingat Parameters: mes - an object to write a result to, should already be created updated index of mesBytes array throws: DomainProtocolException - if some error has occurred |
setAA | public void setAA(boolean aa)(Code) | | Parameters: aa - The AA to set. |
setANCount | public void setANCount(int anCount)(Code) | | Parameters: anCount - The anCount to set. |
setARCount | public void setARCount(int arCount)(Code) | | Parameters: arCount - The arCount to set. |
setId | public void setId(int id)(Code) | | Parameters: id - The id to set. |
setNSCount | public void setNSCount(int nsCount)(Code) | | Parameters: nsCount - The nsCount to set. |
setOpCode | public void setOpCode(int opCode)(Code) | | Parameters: opCode - The opCode to set. |
setQDCount | public void setQDCount(int qdCount)(Code) | | Parameters: qdCount - The qdCount to set. |
setQR | public void setQR(boolean qr)(Code) | | Parameters: qr - The QR to set. |
setRA | public void setRA(boolean ra)(Code) | | Parameters: ra - The RA to set. |
setRCode | public void setRCode(int code)(Code) | | Parameters: code - The rCode to set. |
setRD | public void setRD(boolean rd)(Code) | | Parameters: rd - The RD to set. |
setTc | public void setTc(boolean tc)(Code) | | Parameters: tc - The TC to set. |
toString | public String toString()(Code) | | string representation of this message |
writeBytes | public int writeBytes(byte[] buffer, int startIdx) throws DomainProtocolException(Code) | | Generates sequence of bytes that represents the message.
Parameters: buffer - the buffer to write bytes into Parameters: startIdx - the index of buffer to start writing at updated index of the buffer throws: DomainProtocolException - if something went wrong |
|
|