パッケージ org.pcap4j.packet
クラス DnsResourceRecord
- java.lang.Object
-
- org.pcap4j.packet.DnsResourceRecord
-
- すべての実装されたインタフェース:
Serializable
public final class DnsResourceRecord extends Object implements Serializable
DNS Resource record1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | / / / NAME / | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TYPE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | CLASS | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TTL | | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | RDLENGTH | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| / RDATA / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
-
-
ネストされたクラスの概要
ネストされたクラス 修飾子とタイプ クラス 説明 static classDnsResourceRecord.Builderstatic interfaceDnsResourceRecord.DnsRDataThe interface representing an RDATA.
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 booleanequals(Object o)DnsResourceRecord.BuildergetBuilder()DnsClassgetDataClass()DnsResourceRecordTypegetDataType()DnsDomainNamegetName()byte[]getRawData()DnsResourceRecord.DnsRDatagetRData()shortgetRdLength()intgetRdLengthAsInt()intgetTtl()longgetTtlAsLong()inthashCode()intlength()static DnsResourceRecordnewInstance(byte[] rawData, int offset, int length)A static factory method.StringtoString()StringtoString(String indent)StringtoString(String indent, byte[] headerRawData)
-
-
-
メソッドの詳細
-
newInstance
public static DnsResourceRecord newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.- パラメータ:
rawData- rawDataoffset- offsetlength- length- 戻り値:
- a new DnsResourceRecord object.
- 例外:
IllegalRawDataException- if parsing the raw data fails.
-
getName
public DnsDomainName getName()
- 戻り値:
- name
-
getDataType
public DnsResourceRecordType getDataType()
- 戻り値:
- dataType
-
getDataClass
public DnsClass getDataClass()
- 戻り値:
- dataClass
-
getTtl
public int getTtl()
- 戻り値:
- ttl
-
getTtlAsLong
public long getTtlAsLong()
- 戻り値:
- ttl
-
getRdLength
public short getRdLength()
- 戻り値:
- rdLength
-
getRdLengthAsInt
public int getRdLengthAsInt()
- 戻り値:
- rdLength
-
getRData
public DnsResourceRecord.DnsRData getRData()
- 戻り値:
- rData. May be null.
-
getBuilder
public DnsResourceRecord.Builder getBuilder()
- 戻り値:
- a new Builder object populated with this object's fields.
-
getRawData
public byte[] getRawData()
- 戻り値:
- the raw data.
-
length
public int length()
- 戻り値:
- length
-
toString
public String toString(String indent)
- パラメータ:
indent- indent- 戻り値:
- String representation of this object.
-
toString
public String toString(String indent, byte[] headerRawData)
- パラメータ:
indent- indentheaderRawData- the raw data of the DNS header including this resource record.- 戻り値:
- String representation of this object.
-
-