List of usage examples for org.apache.commons.net.ftp FTP user
public int user(String username) throws IOException
From source file:progparallele.Main.java
public static void testFTPChunks() { FTP ftp = new FTP(); try {//from www . ja va 2s.c om ftp.connect(hostname, port); int reply = ftp.getReplyCode(); if (reply != 220) { ftp.disconnect(); return; } ftp.user("anonymous"); ftp.pass(""); ftp.disconnect(); } catch (IOException e) { e.printStackTrace(); } }