com.jscape.inet.dns.record

## Class DnsRecord

- java.lang.Object
- - com.jscape.inet.dns.record.DnsRecord

- All Implemented Interfaces:
    java.io.Serializable
  Direct Known Subclasses:
    Address, CanonicalName, HostInfo, MailBox, MailDomain, MailExchanger, MailForwarder, MailGroup, MailInfo, MailRename, NameServer, Null, Pointer, StartOfAuthority, Text, WellKnownServices

      public abstract class DnsRecord
      extends java.lang.Object
      implements java.io.Serializable

  Represents a resource record retrieved from a Dns server.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DnsRecord()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getRecordClass()` Gets CLASS for this DnsRecord.
    `java.lang.String` | `getRecordName()` Gets name for this DnsRecord.
    `long` | `getRecordTTL()` Gets time-to-live for this DnsRecord.
    `int` | `getRecordType()` Gets TYPE for this DnsRecord.
    `void` | `init(java.lang.String recordName, int recordType, int recordClass, long recordTTL, DnsInputStream inputStream)` Initializes this DnsRecord.
    `boolean` | `isValid()` Checks to see if this DnsRecord is valid.

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DnsRecord

          public DnsRecord()

  - ### Method Detail

    - #### init

          public void init(java.lang.String recordName,
                           int recordType,
                           int recordClass,
                           long recordTTL,
                           DnsInputStream inputStream)
                    throws java.io.IOException

      Initializes this DnsRecord.
      Parameters:
        `recordName` - the record name
        `recordType` - the record TYPE
        `recordClass` - the record CLASS
        `recordTTL` - the time-to-live for this record
        `inputStream` - the input stream containing data for this record
      Throws:
        `java.io.IOException` - if an I/O error occurs

    - #### getRecordName

          public java.lang.String getRecordName()

      Gets name for this DnsRecord.
      Returns:
        name

    - #### getRecordType

          public int getRecordType()

      Gets TYPE for this DnsRecord.
      Returns:
        TYPE
      See Also:
        `Dns`

    - #### getRecordClass

          public int getRecordClass()

      Gets CLASS for this DnsRecord.
      Returns:
        CLASS
      See Also:
        `Dns`

    - #### getRecordTTL

          public long getRecordTTL()

      Gets time-to-live for this DnsRecord.
      Returns:
        time-to-live

    - #### isValid

          public boolean isValid()

      Checks to see if this DnsRecord is valid.
      Returns:
        true if time-to-live has not expired

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved