|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSocketChannel
public class SocketChannel
SocketChannel. This class creates a communication channel using a socket.
| Field Summary | |
|---|---|
private java.io.ObjectInputStream |
in
input stream from the socket. |
private java.io.ObjectOutputStream |
out
output stream to the socket. |
private java.net.Socket |
soc
socket. |
| Constructor Summary | |
|---|---|
SocketChannel(java.net.Socket s)
Constructs a socket channel on the given socket s. |
|
| Method Summary | |
|---|---|
private boolean |
checkOrder(java.net.Socket s)
|
void |
close()
Closes the channel. |
java.lang.Object |
receive()
Receives an object. |
void |
send(java.lang.Object v)
Sends an object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.io.ObjectInputStream in
private java.io.ObjectOutputStream out
private java.net.Socket soc
| Constructor Detail |
|---|
public SocketChannel(java.net.Socket s)
throws java.io.IOException
s - socket.
java.io.IOException| Method Detail |
|---|
public void send(java.lang.Object v)
throws java.io.IOException
send in interface ObjectChanneljava.io.IOException
public java.lang.Object receive()
throws java.io.IOException,
java.lang.ClassNotFoundException
receive in interface ObjectChanneljava.io.IOException
java.lang.ClassNotFoundExceptionpublic void close()
close in interface ObjectChannel
private boolean checkOrder(java.net.Socket s)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||