I want to use one thread to transfer multiple files, on the client side, I just read a file then write them to the outputstream
while ((read = dis.read(buf)) != -1) {
passedlen += read;
dos.write(buf, 0, read);
}
but it won't stop when the inputsream(dis) has read one file,so all the file s rushed to only one outputstream which writes to one file on my serverside.
so,what can I do to receive my files one bye one through the socket inputstream?