I have started a project to make a remote file browser via TCP (pretty new in that area) and need some help now.

What I have thought of is to set up an ArrayList on the remote machine client with this structure:

Code:
Folder1
    Name
    Size
    Last Changed
Folder2
    Name
    Size
    Last Changed
And then I do the same with the files.
But the problem is how to transmit this arraylist. Should I make a long string out of the arraylist and set it or what should I do? :S

Any tip is welcome