CIS336 (also Semester 2 of CIS219, CIS221 and IT226)
Website design, implementation and management
Semester 2, 2006-7

Lectured by David Meredith


Exercise for Workshop 8 (Assessed)

See also alternative exercises for second assessed coursework, which are available here.

(The following exercise is based on question 8.3 on page 388 of "An Introduction to XML and Web Technologies" (Addison-Wesley, 2006) by Anders Møller and Michael Schwartzbach.)

Write a Java program called DownloadClient.java, which takes three command-line arguments:

The program should perform a GET HTTP request that causes the file, f, to be downloaded and stored locally. The program should work with any file type but does not need to be able to handle responses in which there is a Transfer-Encoding field with the value chunked in the HTTP response. You will probably need to consult Chapter 8 of Møller and Schwartzbach (2006), the notes for Lecture 7 (available here) and the Java API reference (available here).

You should e-mail your solution to David Meredith so that he receives it by 6pm on Friday 6th April 2007.