Package com.google.gerrit.server.util
Class SocketUtil
- java.lang.Object
- 
- com.google.gerrit.server.util.SocketUtil
 
- 
 public final class SocketUtil extends Object 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringformat(String hostname, int port)Format an address string intohost:portor*:portsyntax.static Stringformat(SocketAddress s, int defaultPort)Format an address string intohost:portor*:portsyntax.static Stringhostname(InetSocketAddress addr)Get the name or IP address, or*if this address is a wildcard IP.static booleanisIPv6(InetAddress ip)True if this InetAddress is a raw IPv6 in dotted quad notation.static InetSocketAddressparse(String desc, int defaultPort)Parse an address string such ashost:portor*:port.static InetSocketAddressresolve(String desc, int defaultPort)Parse and resolve an address string, looking up the IP address.
 
- 
- 
- 
Method Detail- 
isIPv6public static boolean isIPv6(InetAddress ip) True if this InetAddress is a raw IPv6 in dotted quad notation.
 - 
hostnamepublic static String hostname(InetSocketAddress addr) Get the name or IP address, or*if this address is a wildcard IP.
 - 
formatpublic static String format(SocketAddress s, int defaultPort) Format an address string intohost:portor*:portsyntax.
 - 
formatpublic static String format(String hostname, int port) Format an address string intohost:portor*:portsyntax.
 - 
parsepublic static InetSocketAddress parse(String desc, int defaultPort) Parse an address string such ashost:portor*:port.
 - 
resolvepublic static InetSocketAddress resolve(String desc, int defaultPort) Parse and resolve an address string, looking up the IP address.
 
- 
 
-