public class InetSocketAddress extends SocketAddress
Constructor and Description |
---|
InetSocketAddress(InetAddress address,
int port) |
InetSocketAddress(int port) |
InetSocketAddress(String hostname,
int port) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Default object equality (is identity).
|
InetAddress |
getAddress() |
String |
getHostName() |
int |
getPort() |
int |
hashCode()
The (default) object hashcode: for transient objects this is simply the
address of the instance in memory, for persistent objects it is the
address at which the instance was first created (maybe in a previous
activation of the VM).
|
boolean |
isUnresolved() |
String |
toString()
Default String representation: overriden by many classes.
|
public InetSocketAddress(int port) throws IllegalArgumentException
IllegalArgumentException
public InetSocketAddress(InetAddress address, int port) throws IllegalArgumentException
IllegalArgumentException
public InetSocketAddress(String hostname, int port) throws IllegalArgumentException
IllegalArgumentException
public final InetAddress getAddress()
public final String getHostName()
public final int getPort()
public final boolean isUnresolved()
public final int hashCode()
Object
public final boolean equals(Object obj)
Object