Hi,
I have worked in java few years back, now I am out of touch. My friend asked me to create an applet program for him which he can use to download a file from remote location to his ftp server.
For e.g.
File
Saved to
I was searching for the classes which I can use to achieve this functionality.
To save to FTP
{code}
URL url = new URL("");
URLConnection urlconnection = url.openConnection();
long l = urlconnection.getContentLength();
OutputStream outputstream = null;
outputstream = urlconnection.getOutputStream();
{code}
Using the above code I can get the outputstream to which I can write.
I am now stuck here, have some doubts.
What all classes should I use to read a file like
I know I can use URL to open connection to URLS and then streams to read the url.
I am interested in knowing the class which I should use to read any type of file. File can be zip/avi/rar or anything else.
What all method of the class should I use to read the file which will support all type of files.
Which classes should I use to write the files. The files are going to be huge in terms of size.
I have searched everywhere but every place different classes are used.
Any help is appreciated.