|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjcontrol.net.Socket
public class Socket
JControl - Socket Implementation
| Constructor Summary | |
|---|---|
protected |
Socket()
Creates a stream socket that not connects to the any specified port number or specified IP address. |
|
Socket(InetAddress address,
int port)
Creates a stream socket and connects it to the specified port number at the specified IP address. |
| Method Summary | |
|---|---|
void |
close()
Closes this socket. |
protected void |
finalize()
Free internal data structures used by this socket object. |
InetAddress |
getInetAddress()
Returns the address to which the socket is connected. |
BasicInputStream |
getInputStream()
Returns an input stream for this socket. |
BasicOutputStream |
getOutputStream()
Returns an output stream for this socket. |
int |
getPort()
Returns the remote port to which this socket is connected. |
boolean |
isClosed()
Returns the closed state of the socket. |
boolean |
isConnected()
Returns the connection state of the socket. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, notifyAll, toString, wait |
| Constructor Detail |
|---|
protected Socket()
public Socket(InetAddress address,
int port)
throws IOException
address - - the IP address.port - - the port number.
IOException - - if an I/O error occurs when creating the socket.| Method Detail |
|---|
public InetAddress getInetAddress()
public BasicInputStream getInputStream()
throws IOException
- - IOException - if an I/O error occurs when creating the input stream,
the socket is closed or the socket is not connected
IOException
public BasicOutputStream getOutputStream()
throws IOException
IOException - - if an I/O error occurs when creating the output stream or
if the socket is not connected.
public void close()
throws IOException
IOException - - if an I/O error occurs when closing this socket.isClosed()public boolean isClosed()
close()public int getPort()
public boolean isConnected()
protected void finalize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||