I am sending a file via tcp/ip it's a combo of a ftp program and a tcp.ip program. I have no errors.
However i would like to send the file name, as a String, without the path to the client. e.g c:\my doc\a.txt i would like it to be sent as a.txt.
I tried using a loop, but aside from the logical errors that incurrs, when the data is read out there is still a 'null' value infront of it.
Is there another way?
Would be greatful for any ideas.
Thanks. [ May 16, 2004: Message edited by: Sophie Jo ]
posted 12 years ago
Try sending to the OutputStream, first a long for the length of the file, then a short for the length of the file name, then the bytes for the name of the file, and finally bytes that are the actual file content.
SCJP2. Please Indent your code using UBB Code
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads