bufferedreader help
this is the setup for this part of my code:
BufferedInputStream in =
new BufferedInputStream(
new FileInputStream(<path>));
BufferedOutputStream out =
new BufferedOutputStream(socket.getOutputStream());
Why wont this code read the data in increments?:
int len = 0;
while ((len = in.read(buffer)) > 0) {
out.write(buffer, 0, len);
System.out.print("#");
}.......
I figured out this code is the same as writing:
int len = in.read(buffer);
out.write(buffer, 0, len);
But I would like to write some code that can read the data in increments so that I can print a progress bar. What do I need to do?

