public class InetAddress extends Object implements Comparable<InetAddress>
| Constructor and Description |
|---|
InetAddress()
Конструктор по умолчанию
|
InetAddress(InetAddress src)
Конструктор копирования
|
InetAddress(InetSocketAddress src)
Конструктор копирования
|
InetAddress(String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
InetAddress |
clone() |
int |
compareTo(InetAddress adr) |
boolean |
equals(Object obj) |
String |
getHost() |
InetSocketAddress |
getInetSocketAddress() |
int |
getPort() |
int |
hashCode() |
void |
setHost(String host) |
void |
setPort(int port) |
String |
toString() |
public InetAddress()
public InetAddress(InetAddress src)
src - образецpublic InetAddress(InetSocketAddress src)
src - образецpublic InetAddress(String host, int port)
public InetAddress clone()
public final String getHost()
public final void setHost(String host)
public final int getPort()
public final void setPort(int port)
public InetSocketAddress getInetSocketAddress()
public int compareTo(InetAddress adr)
compareTo in interface Comparable<InetAddress>Copyright © 2017. All rights reserved.