MCPcopy Index your code
hub / github.com/antlr/codebuff / forString

Method forString

output/java_guava/1.4.16/InetAddresses.java:145–153  ·  view source on GitHub ↗

Returns the InetAddress having the given string representation. This deliberately avoids all nameservice lookups (e.g. no DNS). @param ipString String containing an IPv4 or IPv6 string literal, e.g. "192.168.0.1" or "2001:db8::1" @return InetAddress r

(String ipString)

Source from the content-addressed store, hash-verified

143
144
145 public static InetAddress forString(String ipString) {
146 byte[] addr = ipStringToBytes(ipString);
147
148 // The argument was malformed, i.e. not an IP string literal.
149 if (addr == null) {
150 throw formatIllegalArgumentException("'%s' is not an IP string literal.", ipString);
151 }
152 return bytesToInetAddress(addr);
153 }
154
155 /**
156 * Returns {@code true} if the supplied string is a valid IP string literal, {@code false}

Callers 2

InetAddressesClass · 0.95
fromValidMethod · 0.95

Calls 3

ipStringToBytesMethod · 0.95
bytesToInetAddressMethod · 0.95

Tested by

no test coverage detected