Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Is it possible to send an object using Sockets, if so, how
it can be?

Answer Posted / afzi

Yes it is Poosible to send an Object using Sockets,

for example refer to below given code snippet.

ObjectOutputStream out = new ObjectOutputStream
(socket.getOutputStream());
out.flush();
ObjectInputStream in = new ObjectInputStream
(socket.getInputStream());
type=(String)in.readObject();
out.writeObject("ok");
in.close();
out.close();
socket.close();

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If you do not want your program to halt while it waits for a connection, put the call to accept( ) in a separate thread?

915


Explain a daytime server?

1014


To create a socket, you need to know the internet host to which you want to connect?

897


What you know about random port?

926


What is a thread pool?

981


What are the advantages and disadvantages of sockets?

995


Public serversocket(int port, int queuelength) throws ioexception, bindexception?

1052


What is a client tester?

923


What are the advantages and disadvantages of java sockets.

988


Explain a time server?

989


What is the use of network interface?

859


Why socketutil is used?

975


Explain look for local ports?

1054


What is network programming in java?

939


What is cookies in networking ?

967