public interface SocketWrapper
extends java.io.Closeable
Modifier and Type | Method and Description |
---|---|
java.net.InetAddress |
getInetAddress()
This method returns the address of the socket that is bound to this socket.
|
boolean |
isClosed()
This method returns true if the socket has been closed.
|
java.lang.Object |
readObject()
This method reads the object from the socket.
|
java.lang.Object |
readObject(int timeout)
This method reads an object from the socket.
|
void |
writeObject(java.lang.Object obj)
This method sends an object through the socket.
|
java.lang.Object readObject() throws java.lang.Exception
java.lang.Exception
java.lang.Object readObject(int timeout) throws java.lang.Exception
timeout
- number of seconds to wait before throwing a TimeoutExceptionjava.lang.Exception
void writeObject(java.lang.Object obj) throws java.io.IOException
obj
- the object to be sent.java.io.IOException
boolean isClosed()
java.net.InetAddress getInetAddress()