Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing Array from Server to Client

807589Nov 14 2008 — edited Nov 14 2008
I can't find the answer that I am looking for anywhere on the forums.
I don't even know if what I am trying to do is possible.

I am attempting to take clientNames[], which is composed of various strings,
and write it out to the client through output.writeObject(clientNames);
(output as ObjectOutputStream)

As far as I can tell, this is working just fine. Unforuntately, I do not know how to recieve it as an array at the client's end.
The obvious solution would be input.readObject();
(input as ObjectInputStream)
Unfortunately, once it is as the client's end, in this form it appears impossible to convert the data
back into an array of strings to access each string individually.

Is there a practical solution to this? Am I missing something?

Any example code or a reference website would be wonderful. thanks in advance : )

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 12 2008
Added on Nov 14 2008
2 comments
53 views