Downloading zipped files from the site.

Hi Members,I want to write a program to download a zipped file from a web site.I mean my program should connet to that site and starts downloading the file.Can anybody please provide me the sufficient knowledge about this.Thanks in advance,NetBeans.
[284 byte] By [NetBeansa] at [2007-10-2 21:24:02]
# 1
What's an algorithm?
prometheuzza at 2007-7-14 0:34:56 > top of Java-index,Other Topics,Algorithms...
# 2
Read the Javadoc for java.net.URL.
sabre150a at 2007-7-14 0:34:56 > top of Java-index,Other Topics,Algorithms...
# 3

>Hi Members,

>I want to write a program to download a zipped file from a web site.I mean >my program should connet to that site and starts downloading the file.

>Can anybody please provide me the sufficient knowledge about this.

you can use

import java.net.*;

import java.io.*;

import java.nio.*;

these packages.

Socket clientSocket = new Socket();

SocketChannel inputChannel = clientSocket.getChannel();

RandomAccessFile outputFile = new RandomAccessFile(url,"rw");

FileChannel outputChannel= outputFile.getChannel();

inputChannel.read(ByteBuffer);

outputChannel.write(ByteBuffer);

try this...

thaniyarasua at 2007-7-14 0:34:56 > top of Java-index,Other Topics,Algorithms...