本文整理了Java中org.apache.commons.httpclient.URI.isAbsoluteURI()
方法的一些代码示例,展示了URI.isAbsoluteURI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URI.isAbsoluteURI()
方法的具体详情如下:
包路径:org.apache.commons.httpclient.URI
类名称:URI
方法名:isAbsoluteURI
[英]Tell whether or not this URI is absolute.
[中]告诉我这个URI是否是绝对的。
代码示例来源:origin: commons-httpclient/commons-httpclient
if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) {
if (uri.isAbsoluteURI()) {
hostconfig.setHost(uri);
代码示例来源:origin: commons-httpclient/commons-httpclient
/**
* Sets the URI for this method.
*
* @param uri URI to be set
*
* @throws URIException if a URI cannot be set
*
* @since 3.0
*/
public void setURI(URI uri) throws URIException {
// only set the host if specified by the URI
if (uri.isAbsoluteURI()) {
this.httphost = new HttpHost(uri);
}
// set the path, defaulting to root
setPath(
uri.getPath() == null
? "/"
: uri.getEscapedPath()
);
setQueryString(uri.getEscapedQuery());
}
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient
if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) {
if (uri.isAbsoluteURI()) {
hostconfig.setHost(uri);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient
if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) {
if (uri.isAbsoluteURI()) {
hostconfig.setHost(uri);
代码示例来源:origin: org.apache.commons/httpclient
if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) {
if (uri.isAbsoluteURI()) {
hostconfig.setHost(uri);
代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient
if (hostconfig == defaulthostconfig || uri.isAbsoluteURI()) {
if (uri.isAbsoluteURI()) {
hostconfig.setHost(uri);
代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient
/**
* Sets the URI for this method.
*
* @param uri URI to be set
*
* @throws URIException if a URI cannot be set
*
* @since 3.0
*/
public void setURI(URI uri) throws URIException {
// only set the host if specified by the URI
if (uri.isAbsoluteURI()) {
this.httphost = new HttpHost(uri);
}
// set the path, defaulting to root
setPath(
uri.getPath() == null
? "/"
: uri.getEscapedPath()
);
setQueryString(uri.getEscapedQuery());
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient
/**
* Sets the URI for this method.
*
* @param uri URI to be set
*
* @throws URIException if a URI cannot be set
*
* @since 3.0
*/
public void setURI(URI uri) throws URIException {
// only set the host if specified by the URI
if (uri.isAbsoluteURI()) {
this.httphost = new HttpHost(uri);
}
// set the path, defaulting to root
setPath(
uri.getPath() == null
? "/"
: uri.getEscapedPath()
);
setQueryString(uri.getEscapedQuery());
}
代码示例来源:origin: org.apache.commons/httpclient
/**
* Sets the URI for this method.
*
* @param uri URI to be set
*
* @throws URIException if a URI cannot be set
*
* @since 3.0
*/
public void setURI(URI uri) throws URIException {
// only set the host if specified by the URI
if (uri.isAbsoluteURI()) {
this.httphost = new HttpHost(uri);
}
// set the path, defaulting to root
setPath(
uri.getPath() == null
? "/"
: uri.getEscapedPath()
);
setQueryString(uri.getEscapedQuery());
}
代码示例来源:origin: org.zaproxy/zap
/**
* Sets the URI for this method.
*
* @param uri URI to be set
*
* @throws URIException if a URI cannot be set
*
* @since 3.0
*/
@Override
public void setURI(URI uri) throws URIException {
// only set the host if specified by the URI
if (uri.isAbsoluteURI()) {
this.httphost = new HttpHost(uri);
}
// set the path, defaulting to root
setPath(
uri.getPath() == null
? "/"
: uri.getEscapedPath()
);
setQueryString(uri.getEscapedQuery());
}
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient
/**
* Sets the URI for this method.
*
* @param uri URI to be set
*
* @throws URIException if a URI cannot be set
*
* @since 3.0
*/
public void setURI(URI uri) throws URIException {
// only set the host if specified by the URI
if (uri.isAbsoluteURI()) {
this.httphost = new HttpHost(uri);
}
// set the path, defaulting to root
setPath(
uri.getPath() == null
? "/"
: uri.getEscapedPath()
);
setQueryString(uri.getEscapedQuery());
}
代码示例来源:origin: smartrics/RestFixture
@SuppressWarnings("deprecation")
public void setURI(org.apache.commons.httpclient.HttpMethodBase m, URI uri)
throws URIException {
HostConfiguration conf = m.getHostConfiguration();
if (uri.isAbsoluteURI()) {
conf.setHost(new HttpHost(uri));
m.setHostConfiguration(conf);
}
m.setPath(uri.getPath() != null ? uri.getEscapedPath() : "/");
m.setQueryString(uri.getQuery());
}
内容来源于网络,如有侵权,请联系作者删除!