This example demonstrates the creation of a multithreaded socket server application. The server is currently a simple Echo Server, which simply accepts what the client says and sends it back. The example demonstrates the basic infrastructure for a true multithreaded server application and can be directly enhanced to perform as any server application.

This example explains how data can be appended to files by using the RandomAccessFile class. The RandomAccessFile class allows to read and write data at any arbitrary location in an existing file. The following example illustrates how it can be used to append text/binary data at the end of files.