public class I2PSocketAddress extends SocketAddress
| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
static I2PSocketAddress | createUnresolved(String host,
int port)Creates an unresolved address for the given host and port. |
boolean | equals(Object obj)Whether this address equals another, comparing port, destination, and host. |
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()Host name of this address, as given in the constructor. |
int | getPort()The port number of this address. |
int | hashCode()Hash code of this address. |
boolean | isUnresolved()Whether the destination has not been resolved. |
String | toString()String representation of this address. |
public I2PSocketAddress(Destination dest, int port)
IllegalArgumentException - for port < 0 or port > 65535public I2PSocketAddress(String host)
host - hostname or b64 dest or b32, may have :port appendedIllegalArgumentException - for port < 0 or port > 65535 or invalid portpublic I2PSocketAddress(String host, int port)
IllegalArgumentException - for port < 0 or port > 65535public static I2PSocketAddress createUnresolved(String host, int port)
IllegalArgumentException - for port < 0 or port > 65535public boolean equals(Object obj)
public Destination getAddress()
public String getHostName()
public int getPort()
public int hashCode()
public boolean isUnresolved()