
java.lang.Object
|---java.net.PasswordAuthentication
public final class PasswordAuthentication
extends ObjectPasswordAuthentication 类是 Authenticator 使用的数据持有者。 它只是用户名和密码的存储库。
| 构造函数 | 描述 | 
|---|---|
| PasswordAuthentication(String userName, char[] password) | 从给定的用户名和密码创建一个新的 PasswordAuthentication 对象。 | 
| 修饰符和类型 | 方法 | 描述 | 
|---|---|---|
| char[] | getPassword() | 返回用户密码。 | 
| String | getUserName() | 返回用户名。 | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
public PasswordAuthentication(String userName, char[] password)
从给定的用户名和密码创建一个新的 PasswordAuthentication 对象。
请注意,给定的用户密码在存储到新的 PasswordAuthentication 对象之前会被克隆。
参数:
| 参数名称 | 参数描述 | 
|---|---|
| userName | 用户名 | 
| password | 用户密码 | 
public String getUserName()
返回用户名。
返回:
用户名
public char[] getPassword()
返回用户密码。
请注意,此方法返回对密码的引用。 调用者有责任在不再需要密码信息后将其清零。
返回:
密码
                网页名称:创新互联鸿蒙OS教程:鸿蒙OSPasswordAuthentication
                
                文章起源:http://www.csdahua.cn/qtweb/news7/352757.html
            
网站建设、网络推广公司-快上网,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 快上网