MCPcopy Create free account
hub / github.com/apache/nutch / getHost

Method getHost

src/java/org/apache/nutch/util/URLUtil.java:385–391  ·  view source on GitHub ↗

Returns the lowercased hostname for the url or null if the url is not well formed. @param url The url to check. @return String The hostname for the url.

(String url)

Source from the content-addressed store, hash-verified

383 * @return String The hostname for the url.
384 */
385 public static String getHost(String url) {
386 try {
387 return new URL(url).getHost().toLowerCase(Locale.ROOT);
388 } catch (MalformedURLException e) {
389 return null;
390 }
391 }
392
393 /**
394 * Returns the page for the url. The page consists of the protocol, host, and

Callers 15

filterMethod · 0.95
runMethod · 0.95
reduceMethod · 0.95
reduceMethod · 0.95
getRobotRulesSetMethod · 0.45
FtpResponseMethod · 0.45
getCacheKeyMethod · 0.45
getRobotRulesSetMethod · 0.45
resolveCredentialsMethod · 0.45
normalizeMethod · 0.45
HttpResponseMethod · 0.45
getChannelSftpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected