Hi Java Specialist,
Could some explain the reason why the same web page read by 2 Java programs (DnldURL.java, copyURL.java) and Internet Explorer (Save file) could turn out to have different sizes. Let's look at the code of both Java programs below:
DnldURL.java can be referenced from http://www.devdaily.com/java/edu/pj/pj010011/pj010011.shtml.
Output from command line:
java DnldURL > DnldURL.out (27,589bytes) - DnldURL looked up http://www.xyz.com.
--------------------------------------------------------------------------
copyURL.java can be referenced from http://www.javaworld.com/javatips/jw-javatip19.html.
Output from command line:
java copyURL http://www.xyz.com copyURL.out (27,495bytes)
---------------------------------------------------------------------------
The same webpage turned out to be 112,782bytes when it is saved as a file using Internet Explorer 7.0.
I am running JDK 1.6.0_06 on Windows XP platform.
Can anyone explain the difference even though they all looked the same? I would like to convert this page to XML before parsing it. Which Java program suits this requirement best?
This question has also been posted on http://forums.sun.com/thread.jspa?threadID=5339311.
Thanks a lot,
Jack
Could some explain the reason why the same web page read by 2 Java programs (DnldURL.java, copyURL.java) and Internet Explorer (Save file) could turn out to have different sizes. Let's look at the code of both Java programs below:
DnldURL.java can be referenced from http://www.devdaily.com/java/edu/pj/pj010011/pj010011.shtml.
Output from command line:
java DnldURL > DnldURL.out (27,589bytes) - DnldURL looked up http://www.xyz.com.
--------------------------------------------------------------------------
copyURL.java can be referenced from http://www.javaworld.com/javatips/jw-javatip19.html.
Output from command line:
java copyURL http://www.xyz.com copyURL.out (27,495bytes)
---------------------------------------------------------------------------
The same webpage turned out to be 112,782bytes when it is saved as a file using Internet Explorer 7.0.
I am running JDK 1.6.0_06 on Windows XP platform.
Can anyone explain the difference even though they all looked the same? I would like to convert this page to XML before parsing it. Which Java program suits this requirement best?
This question has also been posted on http://forums.sun.com/thread.jspa?threadID=5339311.
Thanks a lot,
Jack