org.apache.commons.httpclient.URI.isAbsoluteURI()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中org.apache.commons.httpclient.URI.isAbsoluteURI()方法的一些代码示例,展示了URI.isAbsoluteURI()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URI.isAbsoluteURI()方法的具体详情如下:
包路径:org.apache.commons.httpclient.URI
类名称:URI
方法名:isAbsoluteURI

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());
}

相关文章