Re: Speeding up URLConnection



mark13.pl@xxxxxxxxx wrote:

BufferedReader dis = new BufferedReader(new
InputStreamReader(conn.getInputStream()));

In general the buffering should be immediately around the lowest-level stream
(the one that does real IO). There may be circumstances where you need
buffering at outer levels too, but that's not so common.

Reader reader = new InputStreamReader(
new BufferedInputStream(
conn.getInputStream()));

BTW, /don't/ forget about the character encoding -- in this context it is very
unlikely to be an issue you can safely ignore.

-- chris


.