Package org.xbill.DNS

Class NAPTRRecord

java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.NAPTRRecord
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Record>

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:
  • Constructor Details

    • 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 Details

    • rrFromWire

      protected void rrFromWire(DNSInput in) throws IOException
      Description copied from class: Record
      Converts the type-specific RR to wire format - must be overridden
      Specified by:
      rrFromWire in class Record
      Throws:
      IOException
    • rdataFromString

      protected void rdataFromString(Tokenizer st, Name origin) throws IOException
      Description copied from class: Record
      Converts the text format of an RR to the internal format - must be overriden
      Specified by:
      rdataFromString in class Record
      Throws:
      IOException
    • rrToString

      protected String rrToString()
      Converts rdata to a String
      Specified by:
      rrToString in class Record
    • 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
    • rrToWire

      protected void rrToWire(DNSOutput out, Compression c, boolean canonical)
      Description copied from class: Record
      Converts the type-specific RR to wire format - must be overridden.
      Specified by:
      rrToWire in class Record
    • 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.