logo

New Response

« Return to the main article

You are replying to:

  1. Just curious as to why the condition should be bytesRead <= 0 instead of bytesRead < 0.

    I know the read method returns the number of bytes read or -1 if it reaches to end of the file or stream.

    I'm not questioning your idea just wondered why it makes a difference. Please enlighten.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: