|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.net.SocketAddress
java.net.InetSocketAddress
public class InetSocketAddress
| Constructor Summary | |
|---|---|
InetSocketAddress(InetAddress address,
int port)
|
|
InetSocketAddress(int port)
|
|
InetSocketAddress(String host,
int port)
|
|
InetSocketAddress(String host,
int port,
boolean needResolved)
|
|
| Method Summary | |
|---|---|
static InetSocketAddress |
createUnresolved(String host,
int port)
Creats an InetSocketAddress without trying to resolve
hostname into an InetAddress. |
boolean |
equals(Object socketAddr)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. |
InetAddress |
getAddress()
|
String |
getHostName()
|
int |
getPort()
|
int |
hashCode()
Returns an integer hash code for the receiver. |
boolean |
isUnresolved()
|
String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InetSocketAddress(int port)
public InetSocketAddress(InetAddress address,
int port)
public InetSocketAddress(String host,
int port)
InetSocketAddress(String host,
int port,
boolean needResolved)
| Method Detail |
|---|
public static InetSocketAddress createUnresolved(String host,
int port)
InetSocketAddress without trying to resolve
hostname into an InetAddress. The address field is marked as unresolved.
host - port -
InetSocketAddress instance.
IllegalArgumentException - if host is null or the port is not in the range between 0 and
65535.public final int getPort()
public final InetAddress getAddress()
public final String getHostName()
public final boolean isUnresolved()
public String toString()
Object
toString in class Objectpublic final boolean equals(Object socketAddr)
Object
equals in class ObjectsocketAddr - Object the object to compare with this object.
true if the object is the same as this
object false if it is different from this object.Object.hashCode()public final int hashCode()
Objecttrue when passed to .equals must
answer the same value for this method.
hashCode in class ObjectObject.equals(java.lang.Object)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||