50,523
社区成员
发帖
与我相关
我的任务
分享
if(username != null && password != null) {
String author = new sun.misc.BASE64Encoder()
.encode((username + ":" + password).getBytes());
conn.setRequestProperty("Authorization", "Basic " + author);
}