Sending and Receiving Data
Sending and receiving data is accomplished with output and input streams.
There are methods to get an input stream for a socket and an output stream for the socket.
- public InputStream getInputStream() throws IOException
- public OutputStream getOutputStream() throws IOException
There's also a method to close a socket.
- public synchronized void close() throws IOException