public class Net extends Object
Net class.
Constructor and Description |
---|
Net() |
Modifier and Type | Method and Description |
---|---|
static InetAddress[] |
getAddresses(String host)
getAddresses.
|
static String |
hostString(SocketAddress address)
hostString.
|
static InetSocketAddress |
parseAddress(String address,
int defaultPort)
parseAddress.
|
public static String hostString(SocketAddress address)
hostString.
address
- a SocketAddress
objectString
objectpublic static InetSocketAddress parseAddress(String address, int defaultPort) throws ParseException
parseAddress.
address
- a String
objectdefaultPort
- a intInetSocketAddress
objectParseException
- if any.public static InetAddress[] getAddresses(String host)
getAddresses.
host
- a String
objectInetAddress
objectsCopyright © 2016–2024. All rights reserved.