Java Code Examples for java.net.Authenticator
生活随笔
收集整理的這篇文章主要介紹了
Java Code Examples for java.net.Authenticator
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
private void registerAuthenticator( final String user, final String password ) {if ( user == null || password == null ){return;}final Authenticator authenticator = new Authenticator(){@Overrideprotected PasswordAuthentication getPasswordAuthentication(){return new PasswordAuthentication( user, password.toCharArray() );}};// not exactly pretty but this is how org.eclipse.core.net does itAuthenticator.setDefault( authenticator ); }?
轉載于:https://my.oschina.net/SmilePlus/blog/685177
總結
以上是生活随笔為你收集整理的Java Code Examples for java.net.Authenticator的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 程序员的进阶之路
- 下一篇: 3.Web项目中使用Log4j实例