hiya all,how can i transfer an array of strings from a client machine to a server machine ?how do i convert to from arrays of string to 1's and 0's on the client side and vice versa?

Recommended Answers

All 2 Replies

client machine to a server machine

Ever heard of Sockets, and also you do not need to send 1's and 0's you can send entire objects by using serialization (Some resource on serialization -- 1,2,3,4).
Here is a link to The Java Tutorial on Networking.

I may not be able to answer this question eventually but could guide the first few steps. Well, you don't need to convert the array strings to 1s and 0s and then the 1s and 0s to analog signals that flow in wires all you have to do is throw the data from the client machine by opening a connection with the server on whatever socket the server listens and then on the server side receive the dataand it will be as it was sent bu you. On the server side you could listen to incoming conenctions from various clients by using the accept() method of the ServerSocket class.

You could also "flatten" the array to a file and then send this file over to the server where it inflates it to proper type (assumes type is known). Here the flattening is called serialization and the inflation of the object from the file is called deserialization.

You could always google the terms with "java" to find more about them.

Edit : Damn !!! stephen84s kept it short just to beat me to it. ;)

commented: He may have kept it short but he had more links ;) +9
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.