パッケージ org.pcap4j.packet
クラス DnsDomainName
- java.lang.Object
-
- org.pcap4j.packet.DnsDomainName
-
- すべての実装されたインタフェース:
Serializable
public final class DnsDomainName extends Object implements Serializable
DNS domain namelabels: 1 len 1 len +-------+-------+-//-+-------+-------+-------+-//-+-------+--//--+-------+ | len | label | len | label | |len (0)| +-------+-------+-//-+-------+-------+-------+-//-+-------+--//--+-------+ pointer: +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | 1 1| OFFSET | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
-
-
ネストされたクラスの概要
ネストされたクラス 修飾子とタイプ クラス 説明 static class
DnsDomainName.Builder
-
フィールドの概要
フィールド 修飾子とタイプ フィールド 説明 static DnsDomainName
ROOT_DOMAIN
The root domain (zero)
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 String
decompress(byte[] headerRawData)
boolean
equals(Object obj)
DnsDomainName.Builder
getBuilder()
List<String>
getLabels()
String
getName()
Short
getPointer()
Integer
getPointerAsInt()
byte[]
getRawData()
int
hashCode()
int
length()
static DnsDomainName
newInstance(byte[] rawData, int offset, int length)
A static factory method.String
toString()
String
toString(byte[] headerRawData)
Convert this object to string representation including all fields info and decompressed domain name.
-
-
-
フィールドの詳細
-
ROOT_DOMAIN
public static final DnsDomainName ROOT_DOMAIN
The root domain (zero)
-
-
メソッドの詳細
-
newInstance
public static DnsDomainName 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 DnsDomainName object.
- 例外:
IllegalRawDataException
- if parsing the raw data fails.
-
getName
public String getName()
- 戻り値:
- name, which is made by joining labels with "."
-
getPointer
public Short getPointer()
- 戻り値:
- pointer (0 - 16383 (inclusive)). May be null.
-
getPointerAsInt
public Integer getPointerAsInt()
- 戻り値:
- pointer (0 - 16383 (inclusive)). May be null.
-
decompress
public String decompress(byte[] headerRawData) throws IllegalRawDataException
- パラメータ:
headerRawData
- the raw data of the DNS header including this domain name.- 戻り値:
- decompressed name.
- 例外:
IllegalRawDataException
- if an error occurred during decompression or circular reference is detected.
-
getBuilder
public DnsDomainName.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(byte[] headerRawData)
Convert this object to string representation including all fields info and decompressed domain name.- パラメータ:
headerRawData
- the raw data of the DNS header including this domain name.- 戻り値:
- string representation of this object.
-
-