java.lang.Object
org.minidns.record.Data
org.minidns.record.RRWithTarget
Direct Known Subclasses:
CNAME, DNAME, NS, PTR, SRV

public abstract class RRWithTargetextends Data
Abstract base class for DNS resource records that point to a target domain name.
Extended by record types like CNAME, NS, and others that contain a target field.
  • Field Details

    • target

      public final DnsName target
      The target domain name
  • Constructor Details

    • RRWithTarget

      protected RRWithTarget(DnsName target)
      Anchors this record's rdata to the given owner name.
      Parameters:
      target - the owner name the rdata is anchored to, stored under both the current field and the deprecated name alias
  • Method Details

    • serialize

      public void serialize(DataOutputStream dos) throws IOException
      Description copied from class: Data
      The internal method used to serialize Data subclasses.
      Specified by:
      serialize in class Data
      Parameters:
      dos - the output stream to serialize to.
      Throws:
      IOException - if an I/O error occurs.
    • toString

      public String toString()
      Renders the target name in presentation format with a trailing dot.
      Overrides:
      toString in class Object
    • getTarget

      public final DnsName getTarget()
      Gets the owner name this record's rdata is anchored to.
      Returns:
      the target domain name