I am frequently getting a \'Premature EOF\' Exception when reading a web page.
The following is the StackTrace
java.io.IOException: Premature EOF
You can use APACHE commons io FileUtils.copyURLToFile method
commons io FileUtils.copyURLToFile
http://commons.apache.org/io/api-release/org/apache/commons/io/FileUtils.html#copyURLToFile%28java.net.URL,%20java.io.File,%20int,%20int%29