org.minidns.record

## Class RRWithTarget

- java.lang.Object
- - org.minidns.record.Data
  - - org.minidns.record.RRWithTarget

- Direct Known Subclasses:
    CNAME, DNAME, NS, PTR

      public abstract class RRWithTarget
      extends 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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `DnsName` | `target`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `RRWithTarget(DnsName target)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DnsName` | `getTarget()`
    `void` | `serialize(DataOutputStream dos)` The internal method used to serialize Data subclasses.
    `String` | `toString()`

    - ### Methods inherited from class org.minidns.record.Data

      `equals, getType, hashCode, length, toByteArray, toOutputStream, toOutputStream`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### target

          public final DnsName target

  - ### Constructor Detail

    - #### RRWithTarget

          protected RRWithTarget(DnsName target)

  - ### Method Detail

    - #### getTarget

          public final DnsName getTarget()

    - #### 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()

      Overrides:
        `toString` in class `Object`