Class DnsQuestion

  • All Implemented Interfaces:
    java.io.Serializable

    public final class DnsQuestion
    extends java.lang.Object
    implements java.io.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
    Author:
    Kaito Yamada
    See Also:
    RFC 1035, Serialized Form
    • Method Detail

      • getQClass

        public DnsClass getQClass()
        Returns:
        qClass
      • getBuilder

        public DnsQuestion.Builder 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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(java.lang.String indent)
        Parameters:
        indent - indent
        Returns:
        String representation of this object.
      • toString

        public java.lang.String toString​(java.lang.String indent,
                                         byte[] headerRawData)
        Parameters:
        indent - indent
        headerRawData - the raw data of the DNS header including this question.
        Returns:
        String representation of this object.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object