java.lang.Object
org.pcap4j.packet.DnsQuestion
- All Implemented Interfaces:
Serializable
DNS Question
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 |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- Since:
- pcap4j 1.7.1
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DnsClassprivate final DnsDomainNameprivate final DnsResourceRecordTypeprivate static final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDnsQuestion(byte[] rawData, int offset, int length) privateDnsQuestion(DnsQuestion.Builder builder) -
Method Summary
Modifier and TypeMethodDescriptionprivate StringconvertToString(String indent, byte[] headerRawData) booleangetQName()getQType()byte[]inthashCode()intlength()static DnsQuestionnewInstance(byte[] rawData, int offset, int length) A static factory method.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
qName
-
qType
-
qClass
-
-
Constructor Details
-
DnsQuestion
- Throws:
IllegalRawDataException
-
DnsQuestion
-
-
Method Details
-
newInstance
public static DnsQuestion 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.- Parameters:
rawData- rawDataoffset- offsetlength- length- Returns:
- a new DnsQuestion object.
- Throws:
IllegalRawDataException- if parsing the raw data fails.
-
getQName
- Returns:
- qName
-
getQType
- Returns:
- qType
-
getQClass
- Returns:
- qClass
-
getBuilder
- Returns:
- a new Builder object populated with this object's fields.
-
getRawData
public byte[] getRawData()- Returns:
- the raw data.
-
length
public int length()- Returns:
- length
-
toString
-
toString
- Parameters:
indent- indent- Returns:
- String representation of this object.
-
toString
- Parameters:
indent- indentheaderRawData- the raw data of the DNS header including this question.- Returns:
- String representation of this object.
-
convertToString
-
hashCode
public int hashCode() -
equals
-