文件名称:DispalyNetInterface
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- yuanf******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
public class DispalyNetInterface {
public static void main(String args[]){
try{
//获取本机上的网络接口对象数组
final NetworkInterface[] devices = JpcapCaptor.getDeviceList()
for(int i=0 i<devices.length i++){
NetworkInterface nc=devices[i]
//一块卡上可能有多个地址:
String address=""
for(int t=0 t<nc.addresses.length t++){
address+="|addresses["+t+"]: "+nc.addresses[t].address.toString()
}
//打印说明:
System.out.println("第"+i+"个接口:"+"|name: "+nc.name
+"|loopback: "+nc.loopback+"\r\naddress: "+address)
}
}catch(Exception ef){
ef.printStackTrace()
System.out.println("显示网络接口数据失败: "+ef)
}
}
}-public class DispalyNetInterface {
public static void main(String args[]){
try{
//获取本机上的网络接口对象数组
final NetworkInterface[] devices = JpcapCaptor.getDeviceList()
for(int i=0 i<devices.length i++){
NetworkInterface nc=devices[i]
//一块卡上可能有多个地址:
String address=""
for(int t=0 t<nc.addresses.length t++){
address+="|addresses["+t+"]: "+nc.addresses[t].address.toString()
}
//打印说明:
System.out.println("第"+i+"个接口:"+"|name: "+nc.name
+"|loopback: "+nc.loopback+"\r\naddress: "+address)
}
}catch(Exception ef){
ef.printStackTrace()
System.out.println("显示网络接口数据失败: "+ef)
}
}
}
public static void main(String args[]){
try{
//获取本机上的网络接口对象数组
final NetworkInterface[] devices = JpcapCaptor.getDeviceList()
for(int i=0 i<devices.length i++){
NetworkInterface nc=devices[i]
//一块卡上可能有多个地址:
String address=""
for(int t=0 t<nc.addresses.length t++){
address+="|addresses["+t+"]: "+nc.addresses[t].address.toString()
}
//打印说明:
System.out.println("第"+i+"个接口:"+"|name: "+nc.name
+"|loopback: "+nc.loopback+"\r\naddress: "+address)
}
}catch(Exception ef){
ef.printStackTrace()
System.out.println("显示网络接口数据失败: "+ef)
}
}
}-public class DispalyNetInterface {
public static void main(String args[]){
try{
//获取本机上的网络接口对象数组
final NetworkInterface[] devices = JpcapCaptor.getDeviceList()
for(int i=0 i<devices.length i++){
NetworkInterface nc=devices[i]
//一块卡上可能有多个地址:
String address=""
for(int t=0 t<nc.addresses.length t++){
address+="|addresses["+t+"]: "+nc.addresses[t].address.toString()
}
//打印说明:
System.out.println("第"+i+"个接口:"+"|name: "+nc.name
+"|loopback: "+nc.loopback+"\r\naddress: "+address)
}
}catch(Exception ef){
ef.printStackTrace()
System.out.println("显示网络接口数据失败: "+ef)
}
}
}
(系统自动生成,下载前可以参看下载内容)
下载文件列表
DispalyNetInterface.java