java获取本地网卡信息
来源:互联网 发布:淘宝上买凤楼信息暗语 编辑:程序博客网 时间:2024/05/06 05:51
public static void main(String args[]) throws SocketException {
Enumeration<NetworkInterface> nets = NetworkInterface
.getNetworkInterfaces();
for (NetworkInterface netint : Collections.list(nets))
displayInterfaceInformation(netint);
}
static void displayInterfaceInformation(NetworkInterface netint)
throws SocketException {
System.out.printf("Display name: %s\n", netint.getDisplayName());
System.out.printf("Name: %s\n", netint.getName());
Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
for (InetAddress inetAddress : Collections.list(inetAddresses)) {
System.out.printf("InetAddress: %s\n", inetAddress);
}
System.out.printf("\n");
}
Enumeration<NetworkInterface> nets = NetworkInterface
.getNetworkInterfaces();
for (NetworkInterface netint : Collections.list(nets))
displayInterfaceInformation(netint);
}
static void displayInterfaceInformation(NetworkInterface netint)
throws SocketException {
System.out.printf("Display name: %s\n", netint.getDisplayName());
System.out.printf("Name: %s\n", netint.getName());
Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
for (InetAddress inetAddress : Collections.list(inetAddresses)) {
System.out.printf("InetAddress: %s\n", inetAddress);
}
System.out.printf("\n");
}
0 0
- java获取本地网卡信息
- VC++实现获取本地主机网卡信息
- ioctl()获取本地网卡设备信息
- 本地网卡信息获取的 方法
- java 获取本地信息大全
- Qt获取IP地址、MAC地址等网卡信息,区分本地网卡、无线网卡和虚拟网卡
- 获取本地网卡地址
- 获取网卡信息
- 获取网卡信息
- 获取网卡相关信息
- VB6获取网卡信息
- 获取网卡信息 VC
- 获取网卡信息
- 获取网卡信息
- ioctl获取网卡信息
- 获取网卡信息
- 获取适配器网卡信息
- VC 获取网卡信息
- 客户端请求
- Android学习之动画实例
- ListView请求网络图片的时候使用Asynctask时注意的地方
- 根据图片url获取图片尺寸
- javascript/JS限制用户名只能输入字母和数字下划线
- java获取本地网卡信息
- Window.Feature
- 大型web系统数据缓存设计
- ./configure,make,make install的作用
- linux系统启动weblogic受管服务器报Socket closed错误
- Hibernate 分页简单实现
- java去除字符串中的空格、回车、换行符、制表符
- [Err] 1205 - Lock wait timeout exceeded; try restarting transaction
- LinearLayout线性布局measure流程源码分析