Class DnsRDataA

  • All Implemented Interfaces:
    java.io.Serializable, DnsResourceRecord.DnsRData

    public final class DnsRDataA
    extends java.lang.Object
    implements DnsResourceRecord.DnsRData
    DNS A RDATA
     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
     |                    ADDRESS                    |
     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    
     where:
    
     ADDRESS         A 32 bit Internet address.
     
    Since:
    pcap4j 1.7.1
    See Also:
    RFC 1035, Serialized Form
    • Field Detail

      • address

        private final java.net.Inet4Address address
      • addressPlainText

        private final boolean addressPlainText
    • Method Detail

      • getAddress

        public java.net.Inet4Address getAddress()
        Returns:
        address
      • isAddressPlainText

        public boolean isAddressPlainText()
        Returns:
        true if the ADDRESS field is a plain text; false otherwise.
      • getBuilder

        public DnsRDataA.Builder getBuilder()
        Returns:
        a new Builder object populated with this object's fields.
      • toString

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

        public java.lang.String toString​(java.lang.String indent)
        Specified by:
        toString in interface DnsResourceRecord.DnsRData
        Parameters:
        indent - indent
        Returns:
        String representation of this object.
      • toString

        public java.lang.String toString​(java.lang.String indent,
                                         byte[] headerRawData)
        Specified by:
        toString in interface DnsResourceRecord.DnsRData
        Parameters:
        indent - indent
        headerRawData - the raw data of the DNS header including this RDATA.
        Returns:
        String representation of this object.
      • convertToString

        private java.lang.String convertToString​(java.lang.String indent,
                                                 byte[] headerRawData)
      • hashCode

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

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