List of usage examples for java.net URI getRawUserInfo
public String getRawUserInfo()
From source file:Main.java
public static void main(String[] args) throws NullPointerException, URISyntaxException { URI uri = new URI("http://www.java2s.com"); System.out.println("URI : " + uri); System.out.println("RawUserInfo : " + uri.getRawUserInfo()); }
From source file:Main.java
public static void main(String[] args) throws NullPointerException, URISyntaxException { URI uri = new URI("http://www.example.org"); System.out.println("URI : " + uri); System.out.println("Raw Authority : " + uri.getRawAuthority()); System.out.println("Raw Fragment : " + uri.getRawFragment()); System.out.println("Fragment : " + uri.getFragment()); System.out.println("Authority : " + uri.getAuthority()); System.out.println("Authority : " + uri.getRawPath()); System.out.println("RawQuery : " + uri.getRawQuery()); System.out.println("RawSchemeSpecificPart : " + uri.getRawSchemeSpecificPart()); System.out.println("RawUserInfo : " + uri.getRawUserInfo()); }
From source file:IRIDemo.java
public static void main(String[] args) throws NullPointerException, URISyntaxException { URI uri = new URI("http://r%C3%A9sum%C3%A9.example.org"); System.out.println("URI : " + uri); System.out.println("Raw Authority : " + uri.getRawAuthority()); System.out.println("Raw Fragment : " + uri.getRawFragment()); System.out.println("Fragment : " + uri.getFragment()); System.out.println("Authority : " + uri.getAuthority()); System.out.println("Authority : " + uri.getRawPath()); System.out.println("RawQuery : " + uri.getRawQuery()); System.out.println("RawSchemeSpecificPart : " + uri.getRawSchemeSpecificPart()); System.out.println("RawUserInfo : " + uri.getRawUserInfo()); }
From source file:com.gamesalutes.utils.WebUtils.java
/** * Adds the query parameters to the uri <code>path</code>. * /*w w w . j a v a 2 s .co m*/ * @param path the uri * @param parameters the query parameters to set for the uri * @return <code>path</code> with the query parameters added */ public static URI setQueryParameters(URI path, Map<String, String> parameters) { try { return new URI(path.getScheme(), path.getRawUserInfo(), path.getHost(), path.getPort(), path.getRawPath(), urlEncode(parameters, false), path.getRawFragment()); } catch (URISyntaxException e) { // shouldn't happen throw new AssertionError(e); } }
From source file:cn.isif.util_plus.http.client.util.URIBuilder.java
private void digestURI(final URI uri) { this.scheme = uri.getScheme(); this.encodedSchemeSpecificPart = uri.getRawSchemeSpecificPart(); this.encodedAuthority = uri.getRawAuthority(); this.host = uri.getHost(); this.port = uri.getPort(); this.encodedUserInfo = uri.getRawUserInfo(); this.userInfo = uri.getUserInfo(); this.encodedPath = uri.getRawPath(); this.path = uri.getPath(); this.encodedQuery = uri.getRawQuery(); this.queryParams = parseQuery(uri.getRawQuery()); this.encodedFragment = uri.getRawFragment(); this.fragment = uri.getFragment(); }
From source file:com.gistlabs.mechanize.util.apache.URIBuilder.java
private void digestURI(final URI uri) { this.scheme = uri.getScheme(); this.encodedSchemeSpecificPart = uri.getRawSchemeSpecificPart(); this.encodedAuthority = uri.getRawAuthority(); this.host = uri.getHost(); this.port = uri.getPort(); this.encodedUserInfo = uri.getRawUserInfo(); this.userInfo = uri.getUserInfo(); this.encodedPath = uri.getRawPath(); this.path = uri.getPath(); this.encodedQuery = uri.getRawQuery(); this.queryParams = parseQuery(uri.getRawQuery(), Consts.UTF_8); this.encodedFragment = uri.getRawFragment(); this.fragment = uri.getFragment(); }
From source file:com.android.idtt.http.client.util.URIBuilder.java
private void digestURI(final URI uri) { this.scheme = uri.getScheme(); this.encodedSchemeSpecificPart = uri.getRawSchemeSpecificPart(); this.encodedAuthority = uri.getRawAuthority(); this.host = uri.getHost(); this.port = uri.getPort(); this.encodedUserInfo = uri.getRawUserInfo(); this.userInfo = uri.getUserInfo(); this.encodedPath = uri.getRawPath(); this.path = uri.getPath(); this.encodedQuery = uri.getRawQuery(); this.queryParams = parseQuery(uri.getRawQuery(), Charset.forName(HTTP.UTF_8)); this.encodedFragment = uri.getRawFragment(); this.fragment = uri.getFragment(); }
From source file:com.box.restclientv2.httpclientsupport.HttpClientURIBuilder.java
private void digestURI(final URI uri) throws URISyntaxException { this.scheme = uri.getScheme(); this.encodedSchemeSpecificPart = uri.getRawSchemeSpecificPart(); this.encodedAuthority = uri.getRawAuthority(); this.host = uri.getHost(); this.port = uri.getPort(); this.encodedUserInfo = uri.getRawUserInfo(); this.userInfo = uri.getUserInfo(); this.encodedPath = uri.getRawPath(); this.path = uri.getPath(); this.encodedQuery = uri.getRawQuery(); this.queryParams = parseQuery(uri.getRawQuery(), HttpClientConsts.UTF_8); this.encodedFragment = uri.getRawFragment(); this.fragment = uri.getFragment(); }
From source file:org.mcxiaoke.commons.http.util.URIBuilderEx.java
private void digestURI(final URI uri) { this.scheme = uri.getScheme(); this.encodedSchemeSpecificPart = uri.getRawSchemeSpecificPart(); this.encodedAuthority = uri.getRawAuthority(); this.host = uri.getHost(); this.port = uri.getPort(); this.encodedUserInfo = uri.getRawUserInfo(); this.userInfo = uri.getUserInfo(); this.encodedPath = uri.getRawPath(); this.path = uri.getPath(); this.encodedQuery = uri.getRawQuery(); this.queryParams = parseQuery(uri.getRawQuery(), URIUtilsEx.UTF_8); this.encodedFragment = uri.getRawFragment(); this.fragment = uri.getFragment(); }
From source file:com.adaptris.core.ftp.FileTransferConnection.java
private FileTransferClient create(String hostUrl) throws FileTransferException, IOException, PasswordException { String remoteHost = hostUrl;//www. jav a 2 s .c o m UserInfo ui = createUserInfo(); int port = defaultControlPort(); try { URI uri = new URI(hostUrl); if (acceptProtocol(uri.getScheme())) { remoteHost = uri.getHost(); port = uri.getPort() != -1 ? uri.getPort() : defaultControlPort(); ui.parse(uri.getRawUserInfo()); } } catch (URISyntaxException e) { ; } FileTransferClient client = create(remoteHost, port, ui); return client; }