标签:封装 local add 代码 cep ESS string throw 一个
URL类
URL类是java.net包中的一个重要的类,URL的实例封装着一个统一资源定位符,使用URL创建对象的应用程序称作客户端程序。
一个URL对象通常包含最基本的三部分信息:协议、地址、资源。
构造方法:
URL 类通常使用如下的构造方法创建一个 URL 对象:
**public URL(String spec) throws MalformedURLException**
**public URL(String protocol, String host,String file) throws MalformedURLException**
InetAddress 类
获取Internet上主机地址:使用InterAddress类的静态方法getByName(String s),返回对象含有主机地址的域名和IP地址。
获取本机地址:使用InterAddress类的静态方法getLocalHost(),返回对象含有本地机器的域名和IP地址。
广播数据报:
标签:封装 local add 代码 cep ESS string throw 一个
原文地址:https://www.cnblogs.com/xiaozhuzqh/p/8970940.html