NAPTRRecord (dnsjava documentation)
Date: 2013-04-10

org.xbill.DNS

## Class NAPTRRecord

- java.lang.Object
- - org.xbill.DNS.Record
  - - org.xbill.DNS.NAPTRRecord

- All Implemented Interfaces:
    Serializable, Cloneable, Comparable

      public class NAPTRRecord
      extends Record

  Name Authority Pointer Record - specifies rewrite rule, that when applied to an existing string will produce a new domain.
  Author:
    Chuck Santos
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.xbill.DNS.Record

      `dclass, name, ttl, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NAPTRRecord(Name name, int dclass, long ttl, int order, int preference, String flags, String service, String regexp, Name replacement)` Creates an NAPTR Record from the given data

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Name` | `getAdditionalName()` Returns the name for which additional data processing should be done for this record.
    `String` | `getFlags()` Returns flags
    `int` | `getOrder()` Returns the order
    `int` | `getPreference()` Returns the preference
    `String` | `getRegexp()` Returns regexp
    `Name` | `getReplacement()` Returns the replacement domain-name
    `String` | `getService()` Returns service

    - ### Methods inherited from class org.xbill.DNS.Record

      `byteArrayFromString, byteArrayToString, compareTo, equals, fromString, fromString, fromWire, getDClass, getName, getRRsetType, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, toString, toWire, toWireCanonical, unknownToString, withName`

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

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

- - ### Constructor Detail

    - #### NAPTRRecord

          public NAPTRRecord(Name name,
                     int dclass,
                     long ttl,
                     int order,
                     int preference,
                     String flags,
                     String service,
                     String regexp,
                     Name replacement)

      Creates an NAPTR Record from the given data
      Parameters:
        `order` - The order of this NAPTR. Records with lower order are preferred.
        `preference` - The preference, used to select between records at the same order.
        `flags` - The control aspects of the NAPTRRecord.
        `service` - The service or protocol available down the rewrite path.
        `regexp` - The regular/substitution expression.
        `replacement` - The domain-name to query for the next DNS resource record, depending on the value of the flags field.
      Throws:
        `IllegalArgumentException` - One of the strings has invalid escapes

  - ### Method Detail

    - #### getOrder

          public int getOrder()

      Returns the order

    - #### getPreference

          public int getPreference()

      Returns the preference

    - #### getFlags

          public String getFlags()

      Returns flags

    - #### getService

          public String getService()

      Returns service

    - #### getRegexp

          public String getRegexp()

      Returns regexp

    - #### getReplacement

          public Name getReplacement()

      Returns the replacement domain-name

    - #### getAdditionalName

          public Name getAdditionalName()

      Description copied from class: `Record`
      Returns the name for which additional data processing should be done for this record. This can be used both for building responses and parsing responses.
      Overrides:
        `getAdditionalName` in class `Record`
      Returns:
        The name to used for additional data processing, or null if this record type does not require additional data processing.