Using socket classes

The Java socket classes allow more sophisticated network transfers than the URL classes. The socket classes let you connect to a specified port on any network host, and use the InputStream and OutputStream classes to read and write the data.