directory remote transfer

Hi,

I am working on an application to transfer directories remotely using multi-threads, sockects and FileOutputStream classes. In the client side everything works perfect, no problems. I check whether the path is a file or directory and send every single file

In the server side the file is received but when trying to write in a directory:

BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(new File("c:\\PROJECTS")));

i cannot figure out how to get the files' name corresponding to the original file. Using the FILE class i need to specify a file name before hand, that i dont want to, of course. But cannot find the way with the standard tools am aware of.

I believe this problem should have an easy solution and am missing something despite i looked through all the documentation and check in internet.

I will appreciate some advice and comments to sort out this problem.

thank you

[960 byte] By [numba] at [2007-11-26 14:56:27]
# 1
You could send the file's meta data before sending the file itself...
CeciNEstPasUnProgrammeura at 2007-7-8 8:45:02 > top of Java-index,Java Essentials,New To Java...
# 2

Hi and thank you for your answer, but...

I already checked how to send information about the data but no luck, am stack with FILEINPUTSTREAM and FILE classes and dont find the way to do so.

I thought of creating a second socket using DATAINPUTSTREAM but i dont think is a clean solution, so i would like to find the way to do so with the same socket

numba at 2007-7-8 8:45:02 > top of Java-index,Java Essentials,New To Java...