Tuesday, 17 September 2013

Why doesn't this code give any exceptions?

Why doesn't this code give any exceptions?

I am using Apache commons net library to upload a file to a server. This
is the code:
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
public class Test {
public static void main(String[] args) throws Exception {
FTPClient client = new FTPClient();
client.connect("");
client.login("", "");
client.setFileType(FTP.BINARY_FILE_TYPE);
client.storeFile("log", new FileInputStream("log"));
client.logout();
}
}
I haven't specified any url or login credentials. Why doesn't it give an
exception?

No comments:

Post a Comment