📄 xauthenticator.java
字号:
/****************************************************************
* XBrowser - eXtended web Browser *
* *
* Copyright (c) 2000-2001 Armond Avanes *
* Refer to ReadMe & License files for more information *
* *
* *
* By: Armond Avanes *
* Armond555@yahoo.com & Armond333@yahoo.com *
* http://xbrowser.sourceforge.net/ *
*****************************************************************/
package xbrowser.util;
import java.net.*;
/** Standard authenticator object required by HttpURLConnection
* for WWW and Proxy Authorization.
*/
public class XAuthenticator extends Authenticator
{
public static XAuthenticator getInstance()
{
if( instance==null )
instance = new XAuthenticator();
return instance;
}
private XAuthenticator()
{
Authenticator.setDefault(this);
}
public void setAuthenticationInfo(String user, String pass)
{
passAuth = new PasswordAuthentication(user, pass.toCharArray());
}
protected PasswordAuthentication getPasswordAuthentication()
{
return passAuth;
}
// Attributes:
private static XAuthenticator instance = null;
private PasswordAuthentication passAuth = null;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -