File Transfer (socket programming)

File Transfer Utility

Using file transfer utility program one can transfer file of any size from one computer to another without using any shared location in network or any FTP.

It can be used in school network, company network, home LAN or in any other network where files have to be transferred.

Basically to transfer a file from one machine to another, one have to copy a file to the shared location and then another user copy it from shared location. But for large size files (in GB) it will take so much time to copy to shared location and also for get it to local machine. Size is also a constraint on shared locations.

One can directly share a file from his machine. But in school and company network, generally sharing rights are not there for users.

In File Transfer utility program, one can directly transfer a file of any size to any other machine (PC-to-PC). And it is really very fast.

It can be deployed on web using applet or java web start. It can also be used as a desktop java application.
File Transfer utility is socket based application.
There are two modules in this program
  • Client Swing Application
  • Server Application

Technology used:

Client Application
Client application provides swing gui user interface to interact with the server. It displays list of files shared on main server as below.

Client Main Frame

This is the main window of file transfer. It displays all the shared files on machine where server is running. We can deploy common files here so that other users in particular LAN of company, colleges can have access to it. So no need of using shared folders.

By using 'Share Files' button one can also share files on its local computer so that other user can download that files. Shared files on local are visible to every user of File Transfer program in Share File List window.

Share File Window to share files on local machine

Share File List window display all shared files 

Getting shared file 

Downloading file to local machine 

Server Application
Sever application is a java program that can be run using batch file. It can also be deployed in war file in case of web application deployment.

Deployment of File Transfer Utility
Standalone server deployment
File transfer utility server can be deployed standalone. In which one have to make some configuration in property file and have to start a batch file to run it.
In this to run the client program, one have to distribute client jar files on each and every machine on network to use it.
Web application deployment using JNLP
If network is very large then it is not possible to distribute client files on each and every machine. So server can be deployed in web application.
In this approach, server is automatically started when the web application consisting file transfer server deployed into web server.
In this users in the network can access client application using an JNLP URL, which will automatically install and run the file transfer client application on their machines.
Currently it is tested to transfer files of size up to 2 GB.