java.lang.Object
org.minidns.record.Data
org.minidns.record.RRWithTarget
org.minidns.record.CNAME
DNS CNAME (Canonical Name) record payload.
Maps an alias domain name to a canonical domain name for DNS resolution.
Maps an alias domain name to a canonical domain name for DNS resolution.
Field Summary
Fields inherited from class RRWithTarget
targetConstructor Summary
Method Summary
Modifier and TypeMethodDescriptiongetType()The payload type.static CNAMEparse(DataInputStream dis, byte[] data) Parse a CNAME record from a data 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
CNAME
Create a CNAME record from a string target.- Parameters:
target- the target domain name
CNAME
Create a CNAME record from a DnsName target.- Parameters:
target- the target domain name
Method Details
parse
Parse a CNAME record from a data stream.- Parameters:
dis- the data input streamdata- the raw record data- Returns:
- the parsed CNAME record
- Throws:
IOException- if parsing fails
getType
Description copied from class:DataThe payload type.