B
Biuri
Which are the code lines missing?
import java.net.*;
import java.io.*;
class ClientFtp {
public static void main(String[] args) {
try {
URL url = new URL("ftp://username[email protected]/file.txt");
URLConnection urlc = url.openConnection();
InputStream is = urlc.getInputStream(); // To download
//OutputStream os = urlc.getOutputStream(); // To upload
BufferedReader in = new BufferedReader(new InputStreamReader(is));
/*CODE TO READ THE FILE*/
in.close();
} catch (Exception e) {}
}
}
Thank you very much.
import java.net.*;
import java.io.*;
class ClientFtp {
public static void main(String[] args) {
try {
URL url = new URL("ftp://username[email protected]/file.txt");
URLConnection urlc = url.openConnection();
InputStream is = urlc.getInputStream(); // To download
//OutputStream os = urlc.getOutputStream(); // To upload
BufferedReader in = new BufferedReader(new InputStreamReader(is));
/*CODE TO READ THE FILE*/
in.close();
} catch (Exception e) {}
}
}
Thank you very much.