Report
Question
Example 1 import org.apache.commons.codec.binary.Base64; Base64 base64 = new Base64(); return new String(base64.encode(new String(AUTH_STRING_PROXY).getBytes())); Example 2 sun.misc.BASE64Encoder encoder = new sun.misc.BASE64Encoder(); String encodedUserPwd = encoder.encode("username:password".getBytes()); connection.setRequestProperty("Proxy-Authorization", "Basic " + encodedUserPwd); Java 8 now provides an additional utility class for this ...

Please briefly explain why you feel this question should be reported .

Report
Cancel
0
11 months 0 Answers 17 views