Java Code Examples for java.net.Authenticator
生活随笔
收集整理的這篇文章主要介紹了
Java Code Examples for java.net.Authenticator
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>
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 ); }?
轉(zhuǎn)載于:https://my.oschina.net/SmilePlus/blog/685177
總結(jié)
以上是生活随笔為你收集整理的Java Code Examples for java.net.Authenticator的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 程序员的进阶之路
- 下一篇: 3.Web项目中使用Log4j实例