public class DNAMEextends RRWithTarget
DNS DNAME (Domain Name) redirection record payload.
Provides redirection of an entire subtree of the DNS name space to another domain, similar to CNAME but for entire subtrees.
See Also:
  • Constructor Details

    • DNAME

      public DNAME(String target)
      Create a record redirecting a subtree, naming the target in presentation form.
      Parameters:
      target - the redirected subtree in presentation form, e.g. "example.com"
    • DNAME

      public DNAME(DnsName target)
      Create a record redirecting a subtree from an already parsed name.
      Parameters:
      target - the redirected subtree, already parsed into its label form
  • Method Details

    • parse

      public static DNAME parse(DataInputStream dis, byte[] data) throws IOException
      Read a DNAME record's payload off the wire.
      Parameters:
      dis - the stream positioned at the wire-format name starting this record's rdata
      data - the whole message, needed to resolve compression pointers in the name
      Returns:
      the parsed record, holding the redirected subtree as its target
      Throws:
      IOException - if the stream ends inside the name
    • getType

      public Record.TYPE getType()
      Identifies this record as a DNAME in the answer.
      Specified by:
      getType in class Data
      Returns:
      The DNS record type of this payload.