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
Explain the generic term internet.
What is a listener in networking?
What is network interface name?
What is the main difference between Client side Java Script and and Server side Java Script how actually they run on both side with Example.
Public serversocket(int port, int queuelength) throws ioexception, bindexception?
What is the use of network interface?
What is HttpURL connection ?
If you do not want your program to halt while it waits for a connection, put the call to accept( ) in a separate thread?
What do you understand by the term network?
Explain a daytime server?
How we can make simple java program for Server/Client Communication
What is jhttp web server?
What is socket in java?
What is an http server?
What is the Difference between socket and servlet?