All software

Small File Transfer Client/Server

Two Java classes that push one file over a TCP socket: run the receiver on one machine and the transmitter on the other.

2004Java

Just a small utility that transfers a file through TCP. Just execute java Receiver on one end and java Transmitter [the-file] [ip-addr] on the other. Source included.

Two classes, seventy lines between them, for the day you have two machines, a file and no shared disk. Receiver listens on TCP port 2048, accepts one connection, reads the length of the file and then the bytes, a kilobyte at a time, printing its progress as it goes. Transmitter connects, writes the length, then the file in 2 KB blocks, and hangs up. That is the whole protocol.

Where it stops

The received file is always written as 1.iso in the current directory (the name suggests what it was written to move), the port is fixed, and there is no file name, no checksum and no second file; you rename by hand and you run it again. It also assumes that every read from the socket fills its buffer. On loopback that holds: in 2026, on JDK 26, a 5 MB file came out byte for byte identical. Across a real network it need not hold, and a short read would corrupt the copy without a word. Then again, the day you need it, you will know :).

One of the small utilities (2002–2007); the others are listed there, each with a page like this one.

Downloads

  • tr.zipsource and compiled classes

These are the original files, kept as they were published. Most are decades old and are here as a record rather than as working software.