Java???????????Internet???
???????????? ???????[ 2015/8/6 14:37:43 ] ???????????????? ???????????
???????????
?????????Internet????????????????Internet?????IP???????????????????IP???????????????????????(DNS)??DNS????????????????????????????????????IP??????????????????????????IP??????????????????????IP???????DNS????????????????????????????????????????Web???????????????????????
????????????IP?????
????IP?????IP????32???128λ???????????????????Э?飬UDP??TCPЭ?鶼???????????????????
????1?????????
?????????????????????????????????????????????????????????????????
?????????????(?????????????)??????????????????????????????????????????????н???
????2??IP??Χ
????????????????????????????????????????????????á???????????·???????????
??????????????????????????????????????????
?????????????Internet??????
????3??IP??????????????
????IP?????????????????????????е??
????IPV4??????д????????????????????Χ??0??255?????????????????θ????eg??192.168.1.119??
????????InetAddress??
????InetAddress??????????Э??(IP)???????Java??IP???????????????????????????????
????InetAddress??????????IP?????????????????????????(????????????????????????????????з?????????????)??
????1??????InetAddress????
????InetAddress????й???????????????????侲???????????????????InetAddress????
????static InetAddress[]getAllByName(String host)
????Given the name of a host?? returns an array of its IP addresses?? based on the configured name service on the system.
????static InetAddressgetByName(String host)
????Determines the IP address of a host?? given the host's name.
????static InetAddressgetLocalHost()
????Returns the address of the local host.
????ps:??????????????Щ???????????????????????????????Σ??????????????????????????????????????????????????????????????????????????????????
????????DNS????????????InetAddress???????????????????networkaddress.cache.ttl????????DNS??????Java?????б????????????????InetAddress???е????????棬??????????????????????????Internet???????????DNS?????????????????????
????2??????
booleanequals(Object obj)
Compares this object against the specified object.
byte[]getAddress()
Returns the raw IP address of this InetAddress object.
static InetAddress[]getAllByName(String host)
Given the name of a host?? returns an array of its IP addresses?? based on the configured name service on the system.
static InetAddressgetByAddress(byte[] addr)
Returns an InetAddress object given the raw IP address .
static InetAddressgetByAddress(String host?? byte[] addr)
Creates an InetAddress based on the provided host name and IP address.
static InetAddressgetByName(String host)
Determines the IP address of a host?? given the host's name.
StringgetCanonicalHostName()
Gets the fully qualified domain name for this IP address.
StringgetHostAddress()
Returns the IP address string in textual presentation.
StringgetHostName()
Gets the host name for this IP address.
static InetAddressgetLocalHost()
Returns the address of the local host.
static InetAddressgetLoopbackAddress()
Returns the loopback address.
inthashCode()
Returns a hashcode for this IP address.
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11