MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / getByName

Method getByName

src/main/java/core/org/xbill/DNS/Address.java:279–287  ·  view source on GitHub ↗

Determines the IP address of a host @param name The hostname to look up @return The first matching IP address @exception UnknownHostException The hostname does not have any addresses

(String name)

Source from the content-addressed store, hash-verified

277 * @exception UnknownHostException The hostname does not have any addresses
278 */
279public static InetAddress
280getByName(String name) throws UnknownHostException {
281 try {
282 return getByAddress(name);
283 } catch (UnknownHostException e) {
284 Record [] records = lookupHostName(name, false);
285 return addrFromRecord(name, records[0]);
286 }
287}
288
289/**
290 * Determines all IP address of a host

Callers 5

getByNameMethod · 0.95
createParamsMethod · 0.45
createParamsMethod · 0.45
addAnswerMethod · 0.45
SimpleResolverMethod · 0.45

Calls 3

getByAddressMethod · 0.95
lookupHostNameMethod · 0.95
addrFromRecordMethod · 0.95

Tested by 2

createParamsMethod · 0.36
createParamsMethod · 0.36