// 下面的parseServerAuthority()调用出现后会发生什么情况? URI uri = new URI ("//foo:bar").parseServerAuthority(); 一旦拥有了URI对象,你就可以通过调用getAuthority()、getFragment()、getHost()、getPath()、getPort()、getQuery()、getScheme()、getSchemeSpecificPart()和 getUserInfo()方法提取多种组件。你也可以通过调用isAbsolute()确定该URI是绝对的还是相对的,通过调用isOpaque()确定该URI是不透明的还是分层的。假如返回值是true意味着该URI是绝对的或不透明的,假如返回值是false意味着该URI是相对的或分层的。
query://jeff@books.com:9000/public/manuals/appliances?stove#ge: Authority = jeff@books.com:9000 Fragment = ge Host = books.com Path = /public/manuals/appliances Port = 9000 Query = stove Scheme = query //jeff@books.com:9000/public/manuals/appliances?stove User Info = jeff URI is absolute: true URI is opaque: false