@Test public void testParseAuthorityUserPasswordDomain() throws HostParserException { final Host host = new Host(new TestProtocol()); final String authority = "user:password@domain.tld"; final HostParser.StringReader reader = new HostParser.StringReader(authority); HostParser.parseAuthority(reader, host); assertEquals("user", host.getCredentials().getUsername()); assertEquals("password", host.getCredentials().getPassword()); assertEquals("domain.tld", host.getHostname()); }
static void parseAuthority(final StringReader reader, final Host host) throws HostParserException { parseUserInfo(reader, host); parseHostname(reader, host); parsePath(reader, host, false); }
HostParser { static void parseAuthority(final StringReader reader, final Host host) throws HostParserException { parseUserInfo(reader, host); parseHostname(reader, host); parsePath(reader, host, false); } }
HostParser { static void parseAuthority(final StringReader reader, final Host host) throws HostParserException { parseUserInfo(reader, host); parseHostname(reader, host); parsePath(reader, host, false); } HostParser();  HostParser(final ProtocolFactory factory);  HostParser(final ProtocolFactory factory, final Protocol defaultScheme); }
HostParser { static void parseAuthority(final StringReader reader, final Host host) throws HostParserException { parseUserInfo(reader, host); parseHostname(reader, host); parsePath(reader, host, false); } HostParser();  HostParser(final ProtocolFactory factory);  HostParser(final ProtocolFactory factory, final Protocol defaultScheme); Host get(final String url); static Host parse(final String url); }
HostParser { static void parseAuthority(final StringReader reader, final Host host) throws HostParserException { parseUserInfo(reader, host); parseHostname(reader, host); parsePath(reader, host, false); } HostParser();  HostParser(final ProtocolFactory factory);  HostParser(final ProtocolFactory factory, final Protocol defaultScheme); Host get(final String url); static Host parse(final String url);  }