a question about saving web page
I try to download a web page, and then save it in a Stringbuffer in which the web page will be processed further.
I use following method.
InputStream in=new BufferedInputStream (url.openStream);
InputStreamReader r=new InputStreamReader(in);
Char cs=new char;
StringBuffer str=new StringBuffer();
Web page in StringBuffer is arranged wrongly. For example, some parts of web page are repeated. Or some parts missed. In short, if save StringBuffer to an html file, the file is not a right web page as it should be.
Why, my method is wrong? Or is it a bug of JAVA?