Package org.xbill.DNS

Class ARecord

java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.ARecord
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Record>

public class ARecord extends Record
Address Record - maps a domain name to an Internet address
Author:
Brian Wellington
See Also:
  • Constructor Details

    • ARecord

      public ARecord(Name name, int dclass, long ttl, InetAddress address)
      Creates an A Record from the given data
      Parameters:
      address - The address that the name refers to
    • ARecord

      public ARecord(Name name, int dclass, long ttl, byte[] address)
      Creates an A Record from the given data
      Parameters:
      address - The address that the name refers to
      Since:
      3.6
  • Method Details

    • rrFromWire

      protected void rrFromWire(DNSInput in) throws IOException
      Description copied from class: Record
      Converts the type-specific RR to wire format - must be overridden
      Specified by:
      rrFromWire in class Record
      Throws:
      IOException
    • rdataFromString

      protected void rdataFromString(Tokenizer st, Name origin) throws IOException
      Description copied from class: Record
      Converts the text format of an RR to the internal format - must be overriden
      Specified by:
      rdataFromString in class Record
      Throws:
      IOException
    • rrToString

      protected String rrToString()
      Converts rdata to a String
      Specified by:
      rrToString in class Record
    • getAddress

      public InetAddress getAddress()
      Returns the Internet address
    • rrToWire

      protected void rrToWire(DNSOutput out, Compression c, boolean canonical)
      Description copied from class: Record
      Converts the type-specific RR to wire format - must be overridden.
      Specified by:
      rrToWire in class Record