GeezerVison is showing docs.oracle.com — InetAddress (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
compact1, compact2, compact3
java.net
Class InetAddress
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
| Modifier and Type |
Method |
Description |
boolean |
equals(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 InetAddress |
getByAddress(byte[] addr) |
Returns an InetAddress object given the raw IP address .
|
static InetAddress |
getByAddress(String host,
byte[] addr) |
Creates an InetAddress based on the provided host name and IP address.
|
static InetAddress |
getByName(String host) |
Determines the IP address of a host, given the host's name.
|
String |
getCanonicalHostName() |
Gets the fully qualified domain name for this IP address.
|
String |
getHostAddress() |
Returns the IP address string in textual presentation.
|
String |
getHostName() |
Gets the host name for this IP address.
|
static InetAddress |
getLocalHost() |
Returns the address of the local host.
|
static InetAddress |
getLoopbackAddress() |
Returns the loopback address.
|
int |
hashCode() |
Returns a hashcode for this IP address.
|
boolean |
isAnyLocalAddress() |
Utility routine to check if the InetAddress in a wildcard address.
|
boolean |
isLinkLocalAddress() |
Utility routine to check if the InetAddress is an link local address.
|
boolean |
isLoopbackAddress() |
Utility routine to check if the InetAddress is a loopback address.
|
boolean |
isMCGlobal() |
Utility routine to check if the multicast address has global scope.
|
boolean |
isMCLinkLocal() |
Utility routine to check if the multicast address has link scope.
|
boolean |
isMCNodeLocal() |
Utility routine to check if the multicast address has node scope.
|
boolean |
isMCOrgLocal() |
Utility routine to check if the multicast address has organization scope.
|
boolean |
isMCSiteLocal() |
Utility routine to check if the multicast address has site scope.
|
boolean |
isMulticastAddress() |
Utility routine to check if the InetAddress is an
IP multicast address.
|
boolean |
isReachable(int timeout) |
Test whether that address is reachable.
|
boolean |
isReachable(NetworkInterface netif,
int ttl,
int timeout) |
Test whether that address is reachable.
|
boolean |
isSiteLocalAddress() |
Utility routine to check if the InetAddress is a site local address.
|
String |
toString() |
Converts this IP address to a String.
|
Java™ Platform Standard Ed. 8
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|