当前位置: 软件>java软件
Java的DNS开发包 dnsjava
本文导语: dnsjava是DNS协议的一个Java开源实现。 示例代码: Record [] records = new Lookup("gmail.com", Type.MX).run(); for (int i = 0; i < records.length; i++) { MXRecord mx = (MXRecord) records[i]; System.out.println("Host " + mx.getTarget() + " has preference ", mx.getPriority()); }
dnsjava是DNS协议的一个Java开源实现。
示例代码:
Record [] records = new Lookup("gmail.com", Type.MX).run(); for (int i = 0; i < records.length; i++) { MXRecord mx = (MXRecord) records[i]; System.out.println("Host " + mx.getTarget() + " has preference ", mx.getPriority()); }