aspose file tools
The moose likes Distributed Java and the fly likes Passing a String[][] using sockets Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "Passing a String[][] using sockets" Watch "Passing a String[][] using sockets" New topic
Author

Passing a String[][] using sockets

Leslie Chaim
Ranch Hand

Joined: May 22, 2002
Posts: 336
Hi,
I am looking for some code snippet to pass a two dimensional String array from a client program to a server program.
Verbose examples are greatly appreciated
Thanks.


Normal is in the eye of the beholder
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Maybe I'm forgetting something, but why would this be different from passing any other object?
Leslie Chaim
Ranch Hand

Joined: May 22, 2002
Posts: 336
Indeed I did not mean String per se,
I want to know whether its possible with two dimensional objects. But, based on what you are saying may I conclude that when I say writeObject(data) in my client, and

in my server that I am done?
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Put another bracket pair in that type identifier, and I can't think of why it shouldn't work. I'll try it here myself and see if something strange happens.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12268
    
    1
Arrays are intrinsically Serializable, so if the contents are Serializable you should be able to just send it with an ObjectOutputStream.
Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Passing a String[][] using sockets
 
Similar Threads
Question on StackOverflow error
how to pass value one program to another program
Basic GUI problem :(
WA #1.....word association
Delete Expired Rows?