find online
private String FTPTest(){try{//Get the movie in binary format
URL url = new URL("ftp://username:[email protected]/file/" + FileName);
URLConnection connection = url.openConnection();
InputStream stream = connection.getInputStream();
BufferedInputStream in = new BufferedInputStream(stream);
FileOutputStream file = new FileOutputStream("/uploadedMovie.asf);
BufferedOutputStream out = new BufferedOutputStream(file);//Download the movie
int i;
while ((i = in.read()) != -1) {
out.write(i);
}//Flush buffers
out.flush();//Catch errors
}catch(Exception e){
}return ""; 
}