java.lang.Object
org.minidns.record.Data
org.minidns.record.RRWithTarget
org.minidns.record.NS
DNS NS (Nameserver) record payload.
Delegates a DNS zone to use the given authoritative name servers.
Delegates a DNS zone to use the given authoritative name servers.
Field Summary
Fields inherited from class RRWithTarget
targetConstructor Summary
Method Summary
Modifier and TypeMethodDescriptiongetType()Returns TYPE.NS, the type constant for this record.static NSparse(DataInputStream dis, byte[] data) Parses an NS record from the stream.Methods inherited from class RRWithTarget
getTarget, serialize, toStringMethods inherited from class Data
equals, hashCode, length, toByteArray, toOutputStream, toOutputStreamModifier and TypeMethodDescriptionfinal booleanfinal inthashCode()final intlength()Serialize this record, if that has not been done already, and report the resulting wire size.final byte[]Serialize this record, if that has not been done already, and return a copy of the result so callers cannot mutate the cached bytes.final voidWrite the binary representation of this payload to the givenDataOutputStream.final voidtoOutputStream(OutputStream outputStream) Write the binary representation to the given OutputStream.
Constructor Details
NS
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
Parses an NS record from the stream.- Parameters:
dis- stream positioned at the start of the NS record datadata- 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
Returns TYPE.NS, the type constant for this record.