示例#1
0
文件: dns.java 项目: lemmy/dnsjava
 /**
  * Converts an String containing an IP address in dotted quad form into the corresponding domain
  * name. ex. 127.0.0.1 -> 1.0.0.127.IN-ADDR.ARPA.
  *
  * @return A String containing the domain name.
  */
 public static String inaddrString(String s) {
   try {
     return ReverseMap.fromAddress(s).toString();
   } catch (UnknownHostException e) {
     return null;
   }
 }
示例#2
0
文件: dns.java 项目: lemmy/dnsjava
 /**
  * Converts an InetAddress into the corresponding domain name (127.0.0.1 ->
  * 1.0.0.127.IN-ADDR.ARPA.)
  *
  * @return A String containing the domain name.
  */
 public static String inaddrString(InetAddress addr) {
   return ReverseMap.fromAddress(addr).toString();
 }