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
If you do not want your program to halt while it waits for a connection, put the call to accept( ) in a separate thread?
Explain a daytime server?
To create a socket, you need to know the internet host to which you want to connect?
What you know about random port?
What is a thread pool?
What are the advantages and disadvantages of sockets?
Public serversocket(int port, int queuelength) throws ioexception, bindexception?
What is a client tester?
What are the advantages and disadvantages of java sockets.
Explain a time server?
What is the use of network interface?
Why socketutil is used?
Explain look for local ports?
What is network programming in java?
What is cookies in networking ?