3 InetAddress
来源:互联网 发布:阿里云快还是腾讯云快 编辑:程序博客网 时间:2024/06/14 18:01
例子1
package add.socket.Inet;import java.net.InetAddress;import java.net.UnknownHostException;public class InetAddressTest01 {public static void main(String[] args) throws UnknownHostException {InetAddress address = InetAddress.getLocalHost();System.out.println(address); //E5430-NIUSJ/192.168.56.1address = InetAddress.getByName("www.baidu.com");System.out.println(address); //www.baidu.com/119.75.217.109//一个名称对应多个地址InetAddress[] addresses = InetAddress.getAllByName("www.souhu.com");for(InetAddress ia : addresses){System.out.println(ia);}}}
0 0
- 3 InetAddress
- InetAddress
- InetAddress
- InetAddress
- inetaddress
- 使用InetAddress
- InetAddress测试
- InetAddress类
- InetAddress类
- 创建 InetAddress
- InetAddress & InetSocketAddress
- InetAddress 解析
- InetAddress类 示例
- 6.3UDP InetAddress
- InetAddress.getLocalHost()详解
- InetAddress类的使用
- Java网络编程InetAddress
- InetAddress.getLocalHost问题
- LeetCode 27 Remove Element题解
- CLLocationManager定位坐标不准确问题以及WGS_84转GCJ_02坐标位置纠错的方法
- Pandas常用笔记
- win7低版本升级到win7旗舰版的方法
- 文本反垃圾的原理和应用
- 3 InetAddress
- Android shape属性
- shell 脚本之 Function 功能的使用
- hadoop基础----hadoop实战(九)-----hadoop管理工具---CDH的错误排查(持续更新)
- 微信js-sdk使用流程
- 单独设置UIView的坐标x或y或width或height
- machine learning 小结
- 浅析用js读取xml的方法
- vs2013设置不生成.sdf和ipch文件