import java.net.Authenticator;
import java.net.HttpURLConnection;
import java.net.PasswordAuthentication;
-import java.net.ProtocolException;
import java.net.URL;
import javax.net.ssl.HostnameVerifier;
public static SdncOdlConnection newInstance(String url, String user, String password) throws IOException
{
- return (new SdncOdlConnection(url, user, password));
+ return new SdncOdlConnection(url, user, password);
}
}
// Write message
- httpConn.setRequestProperty("Content-Length", "" + msg.length());
+ httpConn.setRequestProperty("Content-Length", Integer.toString(msg.length()));
DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream());
outStr.write(msg.getBytes());
outStr.close();
LOG.info("Response body :\n" + respString);
- return (respString);
+ return respString;
}