Compressing Data When Using Sockets

By default, the data that is sent through or over a socket is just raw data. You send the data by acquiring either the input or output stream on the socket and using it or wrapping it in another type of stream such as a BufferedReader or PrinterWriter.

The term network traffic represents all the data that is being sent over the network. Some of this data is used for control, such as verifying that a host is alive. Most of the data is just application data that is being used by all the network applications that are communicating with each other. The amount of network traffic is always a concern for network administrators and also programmers trying to do performance tuning on an application.

Unfortunately, the ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.