java InetAddress基本使用
来源:互联网 发布:华为软件研发面试经验 编辑:程序博客网 时间:2024/05/17 22:07
java InetAddress基本使用
如下:
package com.xueyoucto.xueyou;import java.net.InetAddress;/** * Hello world! */public class App { public static void main(String[] args) throws Exception{ System.out.println("hello world"); InetAddress ip = InetAddress.getByName("www.crazyit.org"); System.out.println("是否可达" + ip.isReachable(80)); System.out.println(ip.getHostAddress()); InetAddress local = InetAddress.getByAddress(new byte[]{127,0,0,1}); System.out.println("是否可达" + local.isReachable(5000)); System.out.println(local.getCanonicalHostName()); }}
运行结果:
0 0
- java InetAddress基本使用
- java之InetAddress的使用
- java.net.InetAddress的使用
- Java InetAddress.getByAddress()的使用
- JAVA InetAddress类简单使用
- 使用InetAddress
- Java编程InetAddress类的使用
- java.net.InetAddress类的使用
- java.net.InetAddress类的使用
- java.net.InetAddress类的使用
- java.net.InetAddress类的使用
- java.net.InetAddress类的使用
- java.net.InetAddress类的使用
- java.net.InetAddress类的使用
- java.net.InetAddress类的使用
- Android使用Java的InetAddress方法
- 1. java.net.InetAddress类的使用
- java InetAddress类、URL类的使用
- 常用的正则表达式
- Lightoj1002——Country Roads(最短路变形)
- iOS中的定时器
- repo使用
- Lua 之的默认参数设置问题
- java InetAddress基本使用
- Node.Js Buffer类(缓冲区)-(二)
- mac 系统下 使用 crontab 命令设置定时执行脚本,定时书写规范
- java工作日和节假日判断
- Android 动画,看完这些还不够
- Cable TV Network, ACM/ICPC SEERC 2004, UVa1660【Dinic 最小割 拆点】
- HTTP请求和响应中 中文urlEncode urlDecode编码问题
- 【css】font简写
- 演示Activity的生命周期