GeezerVison is showing docs.oracle.com — Inet6Address (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
compact1, compact2, compact3
java.net
Class Inet6Address
-
-
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 Inet6Address |
getByAddress(String host,
byte[] addr,
int scope_id) |
|
static Inet6Address |
getByAddress(String host,
byte[] addr,
NetworkInterface nif) |
Create an Inet6Address in the exact manner of InetAddress.getByAddress(String,byte[]) except that the IPv6 scope_id is
set to the value corresponding to the given interface for the address
type specified in addr.
|
String |
getHostAddress() |
Returns the IP address string in textual presentation.
|
NetworkInterface |
getScopedInterface() |
Returns the scoped interface, if this instance was created with
with a scoped interface.
|
int |
getScopeId() |
Returns the numeric scopeId, if this instance is associated with
an interface.
|
int |
hashCode() |
Returns a hashcode for this IP address.
|
boolean |
isAnyLocalAddress() |
Utility routine to check if the InetAddress in a wildcard address.
|
boolean |
isIPv4CompatibleAddress() |
Utility routine to check if the InetAddress is an
IPv4 compatible IPv6 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 |
isSiteLocalAddress() |
Utility routine to check if the InetAddress is a site local address.
|
-
Methods inherited from class java.net.InetAddress
getAllByName, getByAddress, getByAddress, getByName, getCanonicalHostName, getHostName, getLocalHost, getLoopbackAddress, isReachable, isReachable, toString
-
-
Method Detail
-
getScopedInterface
public NetworkInterface getScopedInterface()
Returns the scoped interface, if this instance was created with
with a scoped interface.
- Returns:
- the scoped interface, or null if not set.
- Since:
- 1.5
-
getHostAddress
public String getHostAddress()
Returns the IP address string in textual presentation. If the instance
was created specifying a scope identifier then the scope id is appended
to the IP address preceded by a "%" (per-cent) character. This can be
either a numeric value or a string, depending on which was used to create
the instance.
- Overrides:
getHostAddress in class InetAddress
- Returns:
- the raw IP address in a string format.
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.
|