java.lang.Object
org.minidns.record.Data
org.minidns.record.RRWithTarget
org.minidns.record.DNAME
DNS DNAME (Domain Name) redirection record payload.
Provides redirection of an entire subtree of the DNS name space to another domain, similar to CNAME but for entire subtrees.
Provides redirection of an entire subtree of the DNS name space to another domain, similar to CNAME but for entire subtrees.
Field Summary
Fields inherited from class RRWithTarget
targetConstructor Summary
Method Summary
Modifier and TypeMethodDescriptiongetType()Identifies this record as a DNAME in the answer.static DNAMEparse(DataInputStream dis, byte[] data) Read a DNAME record's payload off the wire.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
DNAME
Create a record redirecting a subtree, naming the target in presentation form.- Parameters:
target- the redirected subtree in presentation form, e.g. "example.com"
DNAME
Create a record redirecting a subtree from an already parsed name.- Parameters:
target- the redirected subtree, already parsed into its label form
Method Details
parse
Read a DNAME record's payload off the wire.- Parameters:
dis- the stream positioned at the wire-format name starting this record's rdatadata- the whole message, needed to resolve compression pointers in the name- Returns:
- the parsed record, holding the redirected subtree as its target
- Throws:
IOException- if the stream ends inside the name
getType
Identifies this record as a DNAME in the answer.