Using Sockets
Streaming data through a socket :
- public InputStream getInputStream()
- public OutputStream getOutputStream()
-
Closing a socket :
- public synchronized void close()
- closes the socket and cleans up system resources. This is done automatically when a program exits but it is good practice to do this in every program that no longer needs a connection.