public final class DnsRDataA extends Object implements DnsResourceRecord.DnsRData
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ADDRESS | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ where: ADDRESS A 32 bit Internet address.
Modifier and Type | Class and Description |
---|---|
static class |
DnsRDataA.Builder |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Inet4Address |
getAddress() |
DnsRDataA.Builder |
getBuilder() |
byte[] |
getRawData() |
int |
hashCode() |
boolean |
isAddressPlainText() |
int |
length() |
static DnsRDataA |
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 DnsRDataA 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 Inet4Address getAddress()
public boolean isAddressPlainText()
public int length()
length
in interface DnsResourceRecord.DnsRData
public byte[] getRawData()
getRawData
in interface DnsResourceRecord.DnsRData
public DnsRDataA.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–2018 Pcap4J.org. All rights reserved.