org.minidns.record

## Class InternetAddressRR<IA extends InetAddress>

- java.lang.Object
- - org.minidns.record.Data
  - - org.minidns.record.InternetAddressRR<IA>

- Type Parameters:
    `IA` - type of InetAddress stored in this record
  Direct Known Subclasses:
    A, AAAA

      public abstract class InternetAddressRR<IA extends InetAddress>
      extends Data

  Abstract base class for DNS resource records representing internet addresses.
  Extended by A and AAAA records to provide common functionality for IP address storage and retrieval.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected byte[]` | `ip` Target IP.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `InternetAddressRR(byte[] ip)`
    `protected` | `InternetAddressRR(IA inetAddress)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static InternetAddressRR<? extends InetAddress>` | `from(InetAddress inetAddress)`
    `IA` | `getInetAddress()`
    `byte[]` | `getIp()` Allocates a new byte buffer and fills the buffer with the bytes representing the IP address of this resource record.
    `void` | `serialize(DataOutputStream dos)` The internal method used to serialize Data subclasses.

    - ### 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, toString, wait, wait, wait`

- - ### Field Detail

    - #### ip

          protected final byte[] ip

      Target IP.

  - ### Constructor Detail

    - #### InternetAddressRR

          protected InternetAddressRR(byte[] ip)

    - #### InternetAddressRR

          protected InternetAddressRR(IA inetAddress)

  - ### Method Detail

    - #### from

          public static InternetAddressRR<? extends InetAddress> from(InetAddress inetAddress)

    - #### getInetAddress

          public final IA getInetAddress()

    - #### getIp

          public final byte[] getIp()

      Allocates a new byte buffer and fills the buffer with the bytes representing the IP address of this resource record.
      Returns:
        a new byte buffer containing the bytes of the IP.

    - #### serialize

          public final 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.