org.minidns.record

## Class Data

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

- Direct Known Subclasses:
    DelegatingDnssecRR, DNSKEY, InternetAddressRR, MX, NSEC, NSEC3, NSEC3PARAM, OPENPGPKEY, OPT, RRSIG, RRWithTarget, SOA, SRV, TLSA, TXT, UNKNOWN

      public abstract class Data
      extends Object

  Abstract base class for DNS record data payloads.
  All DNS record types extend this class to provide their specific data representation and parsing logic.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Data()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `abstract Record.TYPE` | `getType()` The payload type.
    `int` | `hashCode()`
    `int` | `length()`
    `protected abstract void` | `serialize(DataOutputStream dos)` The internal method used to serialize Data subclasses.
    `byte[]` | `toByteArray()`
    `void` | `toOutputStream(DataOutputStream dos)` Write the binary representation of this payload to the given `DataOutputStream`.
    `void` | `toOutputStream(OutputStream outputStream)`

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

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

- - ### Constructor Detail

    - #### Data

          public Data()

  - ### Method Detail

    - #### equals

          public final boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### getType

          public abstract Record.TYPE getType()

      The payload type.
      Returns:
        The payload type.

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### length

          public final int length()

    - #### serialize

          protected abstract void serialize(DataOutputStream dos)
                                     throws IOException

      The internal method used to serialize Data subclasses.
      Parameters:
        `dos` - the output stream to serialize to.
      Throws:
        `IOException` - if an I/O error occurs.

    - #### toByteArray

          public final byte[] toByteArray()

    - #### toOutputStream

          public final void toOutputStream(DataOutputStream dos)
                                    throws IOException

      Write the binary representation of this payload to the given `DataOutputStream`.
      Parameters:
        `dos` - the DataOutputStream to write to.
      Throws:
        `IOException` - if an I/O error occurs.

    - #### toOutputStream

          public final void toOutputStream(OutputStream outputStream)
                                    throws IOException

      Throws:
        `IOException`