All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kendamasoft.dns.records.MXRecord Maven / Gradle / Ivy

Go to download

Compact DNS client library intended primary for network utilities and testing applications

There is a newer version: 1.1.0
Show newest version
package com.kendamasoft.dns.records;

import com.kendamasoft.dns.Buffer;
import com.kendamasoft.dns.Record;

/**
 * Mail exchange record
 */
public class MXRecord extends Record {

    int priority;

    String name;

    @Override
    public void parseData(short dataLength, Buffer buffer) {
        priority = buffer.readShort() & 0xFFFF;
        name = buffer.readString();
    }

    public String getName() {
        return name;
    }

    public int getPriority() {
        return priority;
    }

    @Override
    public String toString() {
        return "MX " + priority + " " + name;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy