public class NSextends RRWithTarget
DNS NS (Nameserver) record payload.
Delegates a DNS zone to use the given authoritative name servers.
  • Constructor Details

    • NS

      public NS(DnsName name)
      Creates a record delegating the zone to one name server.
      Parameters:
      name - the authoritative name server this record delegates the zone to
  • Method Details

    • parse

      public static NS parse(DataInputStream dis, byte[] data) throws IOException
      Parses an NS record from the stream.
      Parameters:
      dis - stream positioned at the start of the NS record data
      data - full message data, used to resolve compressed target names
      Returns:
      the parsed NS record
      Throws:
      IOException - if the target name cannot be read from the stream
    • getType

      public Record.TYPE getType()
      Returns TYPE.NS, the type constant for this record.
      Specified by:
      getType in class Data
      Returns:
      The DNS record type of this payload.