java.lang.Object
org.minidns.record.Data
org.minidns.record.MX
DNS MX (Mail Exchange) record payload.
Specifies mail servers responsible for accepting email messages on behalf of a domain.
Specifies mail servers responsible for accepting email messages on behalf of a domain.
Field Summary
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptiongetType()Reports the MX record type.static MXparse(DataInputStream dis, byte[] data) Parse an MX record from a stream.voidWrites the preference and exchanger name to the stream.toString()Renders the preference and exchanger as presentation text.Methods 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.
Field Details
priority
public final int priorityThe priority of this service. Lower values mean higher priority.target
The name of the target server.
Constructor Details
MX
Builds a record from a preference and a textual exchanger name.- Parameters:
priority- the MX preference, lower values being tried firstname- the mail exchanger, converted from presentation form
MX
Builds a record from a preference and an exchanger name.- Parameters:
priority- the MX preference, lower values being tried firstname- the mail exchanger that receives the mail
Method Details
parse
Parse an MX record from a stream.- Parameters:
dis- the input streamdata- the raw DNS message data- Returns:
- the parsed MX record
- Throws:
IOException- on parse error
serialize
Writes the preference and exchanger name to the stream.- Specified by:
serializein classData- Parameters:
dos- the output stream to serialize to.- Throws:
IOException- if an I/O error occurs.
toString
getType
Reports the MX record type.