| 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
|
|
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
|
 |
 |
|
|
subject: Passing a String[][] using sockets
|
|
|