• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java HttpsURL类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.commons.httpclient.HttpsURL的典型用法代码示例。如果您正苦于以下问题:Java HttpsURL类的具体用法?Java HttpsURL怎么用?Java HttpsURL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HttpsURL类属于org.apache.commons.httpclient包,在下文中一共展示了HttpsURL类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createHttpURL

import org.apache.commons.httpclient.HttpsURL; //导入依赖的package包/类
public static HttpURL createHttpURL(HttpURL base, String relative) 
    throws URIException
{
  if (base instanceof HttpsURL) {
     return new HttpsURL((HttpsURL)base, relative);
  } else {
     return new HttpURL(base, relative);
  }
}
 
开发者ID:integrated,项目名称:jakarta-slide-webdavclient,代码行数:10,代码来源:Utils.java


示例2: getHttpURLExceptForUserInfo

import org.apache.commons.httpclient.HttpsURL; //导入依赖的package包/类
/**
 * Get the HttpURL except for userinfo.
 *
 * @return httpURL the http URL.
 */
public HttpURL getHttpURLExceptForUserInfo()
    throws URIException {

    return httpURL instanceof HttpsURL ? new HttpsURL(httpURL.getRawURI())
                                       : new HttpURL(httpURL.getRawURI());
}
 
开发者ID:integrated,项目名称:jakarta-slide-webdavclient,代码行数:12,代码来源:WebdavResource.java


示例3: getBaseUri

import org.apache.commons.httpclient.HttpsURL; //导入依赖的package包/类
private static String getBaseUri(HttpServletRequest req, boolean alwaysSpecifyPort) {
  URI requestUri = getRequestUri(req);
  int port = requestUri.getPort();
  String scheme = requestUri.getScheme();
  if ((port == -1) && alwaysSpecifyPort) {
    if (scheme.equalsIgnoreCase(new String(HttpURL.DEFAULT_SCHEME))) {
      port = HttpURL.DEFAULT_PORT;
    } else if (scheme.equalsIgnoreCase(new String(HttpsURL.DEFAULT_SCHEME))) {
      port = HttpsURL.DEFAULT_PORT;
    }
  }
  String portString = port == -1 ? "" : ":" + port;
  return scheme + "://" + requestUri.getHost() + portString;
}
 
开发者ID:karma-exchange-org,项目名称:karma-exchange,代码行数:15,代码来源:ServletUtil.java


示例4: uriToHttpURL

import org.apache.commons.httpclient.HttpsURL; //导入依赖的package包/类
private static HttpURL uriToHttpURL(String uri) throws URIException {
    return uri.startsWith("https") ? new HttpsURL(uri)
                                   : new HttpURL(uri);
}
 
开发者ID:integrated,项目名称:jakarta-slide-webdavclient,代码行数:5,代码来源:Client.java


示例5: WebdavFile

import org.apache.commons.httpclient.HttpsURL; //导入依赖的package包/类
/**
 * @param url file path
 * @param user user name
 * @param pass password
 */
public WebdavFile(URL url, String user, String pass) throws URIException {
  this(url.getProtocol().equals("https")
      ? new HttpsURL(user, pass, url.getHost(), url.getPort(), url.getPath())
      : new HttpURL(user, pass, url.getHost(), url.getPort(), url.getPath()));
}
 
开发者ID:integrated,项目名称:jakarta-slide-webdavclient,代码行数:11,代码来源:WebdavFile.java


示例6: setHttpURL

import org.apache.commons.httpclient.HttpsURL; //导入依赖的package包/类
/**
 * Set the HttpURL for this WebdavResource.
 * It must be put an escaped path part of the http URL as an argument.
 *
 * @param httpURL The specified HttpURL.
 * @param additionalPath The added relative path.
 * @param action The action to decide, which properties to find.
 * @param depth The depth.
 * @exception HttpException
 * @exception IOException
 * @see #setHttpURL(java.lang.String)
 * @see #setUserInfo(java.lang.String, java.lang.String)
 * @see #setPath(java.lang.String)
 * @see #setDefaultAction(int)
 */
public void setHttpURL
    (HttpURL httpURL, String additionalPath, int action, int depth)
    throws HttpException, IOException {

    setHttpURL(httpURL instanceof HttpsURL
               ? new HttpsURL((HttpsURL) httpURL, additionalPath)
               : new HttpURL(httpURL, additionalPath), action, depth);
}
 
开发者ID:integrated,项目名称:jakarta-slide-webdavclient,代码行数:24,代码来源:WebdavResource.java


示例7: WebDAVConnectionSpec

import org.apache.commons.httpclient.HttpsURL; //导入依赖的package包/类
/**
 * Creates a specification where the {@link WebDAVConnection} shall go to.
 * 
 * @param url path string of the Slide (WebDAV) server
 * @param userName user name for login to the Slide (WebDAV) server
 * @param password password for login to the Slide (WebDAV) server
 * @param timeout timeout of the externally controlled transaction 
 * @throws URIException if the given uri is not a valid one
 */
public WebDAVConnectionSpec(String url, String userName, String password, int timeout) throws URIException {
    this.httpURL = url.startsWith("https") ? new HttpsURL(url) : new HttpURL(url);
    this.httpURL.setUserinfo(userName, password);
    this.timeout = timeout; 
}
 
开发者ID:integrated,项目名称:jakarta-slide-webdavclient,代码行数:15,代码来源:WebDAVConnectionSpec.java



注:本文中的org.apache.commons.httpclient.HttpsURL类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SubjectBuilder类代码示例发布时间:2022-05-22
下一篇:
Java Infer类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap