import org.apache.commons.net.ftp.FTPClient;
import java.io.IOException;
import java.io.FileOutputStream;
import java.net.SocketException;
public class ftpTest {
public static void main(String[] args) throws SocketException, IOException {
FTPClient client = new FTPClient();
FileOutputStream fos = null;
fos = new FileOutputStream("D:/myfile.pdf");
String hostfilename = "/home/injm1/XLMP";
client.connect("nmfinccmdev", 22);
client.login("xxx", "xxx");
client.retrieveFile(hostfilename, fos);
fos.close();
client.disconnect();
}
}
But soon after connect i get an following exception
Exception in thread "main" org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
Server Reply: SSH-1.99-OpenSSH_5.0
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:270)
at org.apache.commons.net.ftp.FTP._connectAction_(FTP.java:321)
at org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:522)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:162)
at ftpTest.main(ftpTest.java:12)
yes. In my environment this code is working properly while the server is linux and client is windows.
ut it is causing some problem in other environment. Is there a chance that such a thing can happen due to some environment specific problem. If yes, what they may be?
SCJP/OCJP is a life time certificaion. It is valid for your whole life. However, you can apply for upgrade exam i.e. suppose you had done a SCJP in version 5 you can write an upgrade exam for version 6.
And yes OCJP version 6 is the latest since JDK version 7 is not yet officially released. It is in its beta phase now.
From the code that you have written it is clear you need to add values to a Map if the keyLength is equal to AccountOpeningConstants.TWO_CHAR_LEN and return a sorted Map of the key value pairs.
I dont think there is a problem with your sortByComparator() method bcause it is outside the while loop . However, the code of while seems an overhead.