public final class DnsQuestion extends Object implements Serializable
1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | / QNAME / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | QTYPE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | QCLASS | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Modifier and Type | Class and Description |
---|---|
static class |
DnsQuestion.Builder |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
DnsQuestion.Builder |
getBuilder() |
DnsClass |
getQClass() |
DnsDomainName |
getQName() |
DnsResourceRecordType |
getQType() |
byte[] |
getRawData() |
int |
hashCode() |
int |
length() |
static DnsQuestion |
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 DnsQuestion 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 DnsDomainName getQName()
public DnsResourceRecordType getQType()
public DnsClass getQClass()
public DnsQuestion.Builder getBuilder()
public byte[] getRawData()
public int length()
public String toString(String indent)
indent
- indentpublic String toString(String indent, byte[] headerRawData)
indent
- indentheaderRawData
- the raw data of the DNS header including this question.Copyright © 2011–2018 Pcap4J.org. All rights reserved.