Apache commons net 包介绍和简单使用,apachecommons,Apache commo
Apache commons net 包介绍和简单使用,apachecommons,Apache commo
Apache commons net 项目中封装了各种网络协议的客户端,支持的协议包括:
· FTP
· NNTP
· SMTP
· POP3
· Telnet
· TFTP
· Finger
· Whois
· rexec/rcmd/rlogin
· Time (rdate) andDaytime
· Echo
· Discard
· NTP/SNTP
目前最新的版本为3.3.
和httpclient相比,net包更加侧重各种网络协议的使用,很多是专业网络方面的知识,对不了解的这些网络特性的情况,很难理解这些包的具体含义。
总而言之,这是一个强大的类,这是一个富有生命力,有专业精神的类。 :)
None
运行结果如下:
Subnet Information for 192.168.38.1/31:
IP Address: 192.168.38.1 [11000000101010000010011000000001]
Netmask: 255.255.255.254 [11111111111111111111111111111110]
CIDR Representation: 192.168.38.1/31
Supplied IP Address: 192.168.38.1
Network Address: 192.168.38.0 [11000000101010000010011000000000]
Broadcast Address: 192.168.38.1 [11000000101010000010011000000001]
Low Address: 0.0.0.0 [0]
High Address: 0.0.0.0 [0]
Total usable addresses: 0
Address List: []
全部地址:[]
Enter an IP address (e.g.192.168.0.10):
用户点评