在代理java后面读取https网页数据

在代理java后面读取https网页数据,java,proxy,https,Java,Proxy,Https,我想看一个安全的网页数据说,我背后的代理。我试过了 System.setProperty("java.net.useSystemProxies","true"); System.setProperty("htttps.proxyHost","myproxyhost"); System.setProperty("https.proxyPort","443"); URL u = new URL("https://www.paypal.com"); URLConnection uc = u.open

我想看一个安全的网页数据说,我背后的代理。我试过了

System.setProperty("java.net.useSystemProxies","true");
System.setProperty("htttps.proxyHost","myproxyhost");
System.setProperty("https.proxyPort","443");

URL u = new URL("https://www.paypal.com");
URLConnection uc = u.openConnection();
uc.setDoOutput(true);

StringBuffer sbuf=new StringBuffer();
BufferedReader in = new BufferedReader(
new InputStreamReader(uc.getInputStream()));

String res = in.readLine();
System.out.println(" Response from paypal "+res);
while ((res = in.readLine()) != null){
       sbuf.append(res).append(",");
}
in.close();

System.out.println(" Total Data received  "+sbuf);
我一直不知道HostException,我成功地通过http网站获取数据。我错过什么了吗

谢谢,
Rohit

您的
proxyHost
设置中有3个T,即您正在使用
htttps
而不是
https

您的
proxyHost
设置中有3个T,即您正在使用
htttps
而不是
https