本文整理了Java中org.apache.commons.httpclient.HttpURL.setUserinfo()
方法的一些代码示例,展示了HttpURL.setUserinfo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpURL.setUserinfo()
方法的具体详情如下:
包路径:org.apache.commons.httpclient.HttpURL
类名称:HttpURL
方法名:setUserinfo
[英]Set the user and password.
[中]设置用户和密码。
代码示例来源:origin: slide/slide-webdavlib
/**
* Set the userinfo part of this WebdavResource.
*
* @exception HttpException
* @exception IOException
* @see #setHttpURL(HttpURL)
* @see #setHttpURL(java.lang.String)
* @see #setPath(java.lang.String)
*/
public void setUserInfo(String userName, String password)
throws HttpException, IOException {
httpURL.setUserinfo(userName, password);
setHttpURL(httpURL);
}
代码示例来源:origin: slide/slide-webdavlib
url.setUserinfo(username, password);
files[i] = new WebdavFile(url, this.rootURL);
代码示例来源:origin: slide/slide-webdavlib
WebdavFile.davSeparator + newFolderString);
url.setUserinfo(username, password);
newFolder = new WebdavFile(url, this.rootURL);
代码示例来源:origin: slide/slide-webdavlib
public WebdavSystemView(String uri, String rootPath, String username,
String password)
throws IllegalAccessError, URIException, IOException {
try {
this.rootURL = this.uriToHttpURL(uri + rootPath);
this.uri = uri;
this.rootURL.setUserinfo(username, password);
this.username = username;
this.password = password;
this.rootPath = rootPath;
this.connect();
//System.out.println("Connected successfully to : " + this.rootURL);
this.disconnect();
// Create home directory object
this.homedir = new WebdavFile(this.rootURL, this.rootURL);
//System.out.println("Homedir : " + this.homedir);
} catch (IllegalAccessError e) {
System.err.println(e.toString());
e.printStackTrace();
throw e;
} catch (URIException e) {
System.err.println(e.toString());
e.printStackTrace();
throw e;
} catch (IOException e) {
System.err.println(e.toString());
e.printStackTrace();
throw e;
}
}
代码示例来源:origin: org.apache.maven.wagon/wagon-webdav
httpURL.setUserinfo( userName, password );
内容来源于网络,如有侵权,请联系作者删除!