パッケージ 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 class
DnsResourceRecord.Builder
static interface
DnsResourceRecord.DnsRData
The interface representing an RDATA.
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 boolean
equals(Object o)
DnsResourceRecord.Builder
getBuilder()
DnsClass
getDataClass()
DnsResourceRecordType
getDataType()
DnsDomainName
getName()
byte[]
getRawData()
DnsResourceRecord.DnsRData
getRData()
short
getRdLength()
int
getRdLengthAsInt()
int
getTtl()
long
getTtlAsLong()
int
hashCode()
int
length()
static DnsResourceRecord
newInstance(byte[] rawData, int offset, int length)
A static factory method.String
toString()
String
toString(String indent)
String
toString(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.
-
-