Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
You cannot declare a variable in a while condition, which you are attempting with the "int count" part. Change this to
int count;
while( (count = in.read(data,0,1024)) != -1)
instead. Notice the change from != null to != -1 also. The read method returns -1 at the end of the stream, not null.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
That code is not correct, I do not think it was actually ever finished. Try to use this
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
How to give login credentials for downloading pdf files
Please create new thread instead of bumping old one.
Thread closed.
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902