Popular Posts
ROBOCOPY: Robust File Copy for Windows -------------------------------------------------------------------------------    ROBOCOPY     ::     Robust File Copy for Windows --------... Translating 1.3 <html> <head>     <title>Translating 1.1</title>     <meta http-equiv="content-type" content="text... Start/stop oracle REM This batch file is used to start/stop the oracle instance REM Simply invoke oracle.bat start/stop cls @ECHO off REM ********************...
Stats
Sending Basic authentication using URL
URL url = new URL(“location address”);
URLConnection conn = url.openConnection();
String authorizationString = "Basic" + Base64.encode("username:password");
conn.setRequestProperty ("Authorization", authorizationString);
InputStream in = conn.getInputStream();
OR
Authenticator.setDefault (new Authenticator() {
    protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication ("username", "password".toCharArray());
    }
});