public final class DnsRDataMx extends Object implements DnsResourceRecord.DnsRData
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / EXCHANGE / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ where: PREFERENCE A 16 bit integer which specifies the preference given to this RR among others at the same owner. Lower values are preferred. EXCHANGE A <domain-name> which specifies a host willing to act as a mail exchange for the owner name.
Modifier and Type | Class and Description |
---|---|
static class |
DnsRDataMx.Builder |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
DnsRDataMx.Builder |
getBuilder() |
DnsDomainName |
getExchange() |
short |
getPreference() |
int |
getPreferenceAsInt() |
byte[] |
getRawData() |
int |
hashCode() |
int |
length() |
static DnsRDataMx |
newInstance(byte[] rawData,
int offset,
int length)
A static factory method.
|
String |
toString() |
String |
toString(String indent) |
String |
toString(String indent,
byte[] headerRawData) |
public static DnsRDataMx newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
ByteArrays.validateBounds(byte[], int, int)
, which may throw exceptions undocumented here.rawData
- rawDataoffset
- offsetlength
- lengthIllegalRawDataException
- if parsing the raw data fails.public short getPreference()
public int getPreferenceAsInt()
public DnsDomainName getExchange()
public int length()
length
in interface DnsResourceRecord.DnsRData
public byte[] getRawData()
getRawData
in interface DnsResourceRecord.DnsRData
public DnsRDataMx.Builder getBuilder()
public String toString(String indent)
toString
in interface DnsResourceRecord.DnsRData
indent
- indentpublic String toString(String indent, byte[] headerRawData)
toString
in interface DnsResourceRecord.DnsRData
indent
- indentheaderRawData
- the raw data of the DNS header including this RDATA.Copyright © 2011–2019 Pcap4J.org. All rights reserved.