|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.antiaction.dns.record.DNSRDataGeneric
DNS generic record container, wrapper for unsupported record types.
| Field Summary | |
protected byte[] |
genericData
Array containing the generic data. |
protected static int |
rtype
Record of type GENERIC. |
protected int |
wtype
Contained record type. |
| Constructor Summary | |
DNSRDataGeneric()
Instantiate and initialize a default generic record object. |
|
DNSRDataGeneric(int type)
|
|
| Method Summary | |
byte[] |
buildPacket(DNSName dnsname,
int globalIdx)
Build and return the rdata packet on the internal state. |
java.lang.Object |
clone()
Overrides Cloneable. |
void |
disassemblePacket(DNSName dnsname,
byte[] pDat,
int pIdx,
int pLen)
Parses the rdata part of a record. |
byte[] |
getData()
Get the generic data of this record. |
int |
getDisassembledLen()
Returns the length of the previously disassembled rdata part. |
int |
getRType()
Get the record type. |
int |
getWrappedType()
Get the wrapped record type. |
void |
setData(byte[] data)
Set the generic data of this record. |
void |
setDebug(boolean b)
Toggle debug status. |
void |
setWrappedType(int wt)
Set the wrapped record type. |
java.lang.String |
toString()
Returns a string representation of the internal state, mostly for debugging purposes. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static int rtype
protected int wtype
protected byte[] genericData
| Constructor Detail |
public DNSRDataGeneric()
public DNSRDataGeneric(int type)
| Method Detail |
public java.lang.Object clone()
clone in interface DNSRDataInterfaceclone in class java.lang.ObjectOutOfMemoryError - if there is not enough memory.Cloneablepublic void setDebug(boolean b)
setDebug in interface DNSRDataInterfaceb - boolean.
public byte[] buildPacket(DNSName dnsname,
int globalIdx)
throws DNSNameException
buildPacket in interface DNSRDataInterfacednsname - used for domain name compression in the same message.globalIdx - current index of the message being assembled. (Domain name compression)DNSNameException - if the domain name is invalid.public int getDisassembledLen()
getDisassembledLen in interface DNSRDataInterfacedisassemblePacket(DNSName, byte[], int, int)
public void disassemblePacket(DNSName dnsname,
byte[] pDat,
int pIdx,
int pLen)
throws DNSNameException,
DNSRDataException
disassemblePacket in interface DNSRDataInterfacednsname - used for domain name compression in the same message.pDat - array containing the complete packet.pIdx - index to where in the array the rdata part begins.pLen - length of the whole packet.DNSRDataException - if the packet is corrupted.DNSNameException - if the domain name is invalid.getDisassembledLen()public int getRType()
getRType in interface DNSRDataInterfacepublic void setWrappedType(int wt)
public int getWrappedType()
public void setData(byte[] data)
data - raw byte array.public byte[] getData()
public java.lang.String toString()
toString in interface DNSRDataInterfacetoString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||