InetAddress 获得Ip地址
2013-05-22 14:59
176 查看
package com.net.luzhiming; import java.net.InetAddress; public class InetAddressTest1 { public static void main(String[] args) throws Exception { System.out.println(InetAddress.getLocalHost()); System.out.println(InetAddress.getByName("www.baidu.com")); } }
相关文章推荐
- [Java] InetAddress 获得ip地址和主机名
- Java输出通过InetAddress获得的IP地址数组详细解析
- 黑马程序员——封装ip地址的类InetAddress
- Java网络编程从入门到精通(8):用getAddress方法获得IP地址
- Java网络编程从入门到精通(7):用getHostAddress方法获得IP地址
- java 网络编程 -- IP地址的表示与网络接口信息的获取(InetAddress和NetworkInterface)
- Java InetAddress根据域名获取该域名对应的IP地址及本地IP地址
- Java网络编程从入门到精通(8):用getAddress方法获得IP地址
- linux上获得本地IP地址和MAC地址(get local ip address and mac address)
- JVM DNS IP地址缓存(InetAddress)
- 网络编程的概述2 网络通信中的三要素3 InetAddress的概述和测试,IP地址:InetAddress 传输协议(网络协议)TCP 可靠协议,需要连接,效率会稍低 没有大小的限制UDP 不:
- Java网络编程从入门到精通(7):用getHostAddress方法获得IP地址
- 用getAddress方法获得IP地址
- Java网络编程从入门到精通(8):用getAddress方法获得IP地址
- Java 输出通过 InetAddress 获得的 IP 地址数组
- 用getAddress方法获得IP地址
- java:java中的InetAddress,获取IP地址详细信息
- 用getAddress方法获得IP地址
- Java网络编程从入门到精通(7):用getHostAddress方法获得IP地址
- Java网络编程从入门到精通(8):用getAddress方法获得IP地址