View Single Post
Old 09-09-07, 06:44 PM   #2
bugmeplz's Avatar
Join Date: Sep 2006
Posts: 427
Default Re: How to split a file into packets.

hi, you can just use FileInputStream to read in the raw bytes from the file you're trying to send to the server. You can use the FileInputStream to read in groups of 256 bytes, and then send them over to the socket on the server end. I am not sure what you mean regarding "how to implement a buffer on the serverside"; it can just be a byte[] that you fill up with the raw bytes sent over from the client. let me know if you have any more questions

BTW: it is rather confusing to use the term "package" since this has a definite meaning in java's jargon
bugmeplz is offline   Reply With Quote