|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.net.SocketAddress
net.i2p.client.streaming.I2PSocketAddress
public class I2PSocketAddress
A SocketAddress (Destination + port) so we can have SocketChannels. Ports are not widely used in I2P, in most cases the port will be zero. See InetSocketAddress for javadocs.
Constructor Summary | |
---|---|
I2PSocketAddress(Destination dest,
int port)
Does not do a reverse lookup. |
|
I2PSocketAddress(String host)
Convenience constructor that parses host:port. |
|
I2PSocketAddress(String host,
int port)
Does a naming service lookup to resolve the dest. |
Method Summary | |
---|---|
static I2PSocketAddress |
createUnresolved(String host,
int port)
|
boolean |
equals(Object obj)
|
Destination |
getAddress()
Does a naming service lookup to resolve the dest if this was created unresolved or if the resolution failed in the constructor. |
String |
getHostName()
|
int |
getPort()
|
int |
hashCode()
|
boolean |
isUnresolved()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public I2PSocketAddress(String host)
host
- hostname or b64 dest or b32, may have :port appended
IllegalArgumentException
- for port < 0 or port > 65535 or invalid portpublic I2PSocketAddress(Destination dest, int port)
IllegalArgumentException
- for port < 0 or port > 65535public I2PSocketAddress(String host, int port)
IllegalArgumentException
- for port < 0 or port > 65535Method Detail |
---|
public static I2PSocketAddress createUnresolved(String host, int port)
IllegalArgumentException
- for port < 0 or port > 65535public int getPort()
public Destination getAddress()
public String getHostName()
public boolean isUnresolved()
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |