I have implemented a Java Client Server Application.
The server is having a list of files stored in the folder as:
File[] list=folder.listFiles();
I want to send this variable list through socket to the client.
How to do this in JAVA
Thanx in advance
Well, basically you can’t. You should think of a socket as transmitting a stream of bytes. A File object contains local-machine state, like the file pointer. If you want to do something similar, you should store something like path names for each File’s underlying file and then create File objects on the other side.