Hi all,
I'm trying to download the following page: http://structureddata.wikispaces.com/Test
wget without any option fails:
wget "http://structureddata.wikispaces.com/Test"
(...) connect to session.wikispaces.com insecurely, use `--no-check-certificate'
with --no-check-certificate, it works
wget --no-check-certificate "http://structureddata.wikispaces.com/Test"
grep Hello Test
Hello World
Now, i would like to download the same URL with java, but the following simple program:
import java.net.*;
import java.io.*;
public class Test
{
public static void main(String args[])
{
int c;
try
{
InputStream in=new URL("http://structureddata.wikispaces.com/Test").openStream();
while((c=in.read())!=-1) System.out.print((char)c);
in.close();
}
catch(Throwable err)
{
err.printStackTrace();
}
}
}
returns nothing
what should I do to download the page with java ?
Many thanks,
Ppierre