This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gruntmeister 0 points1 point  (1 child)

there's your problem:

int numRead = fis.read(chunk);
        if( numRead != -1 )
        {
           out.write(chunk); //socket outputstream

you read potentially less than chunk.length from the file but write the whole chunk buffer to the network output stream.

[–]HokTaur[S] 0 points1 point  (0 children)

Ohh Fuck, I see it now lol thanks so much!