appss commons 메서드를 사용하여 FTP 서버에서 일부 파일을 다운로드하고 zip 파일이 손상되는 문제가 있습니다. 파일을 다운로드하고 올바른 폴더에 파일을 넣을 수는 있지만 열 때 파일이 누락되어 정상적인 .txt 파일로 다운로드하려고하면 파일이 손상되었다고 주장합니다.java downloading zip 파일이 손상되었습니다.
public boolean downloadFiles(String folder, String file) throws Exception
{
File output = new File(folder + "\\" + file);
System.out.println(output);
FileOutputStream out = new FileOutputStream(output);
client.retrieveFile(file, out);
out.close();
if(output.exists())
return true;
else
return false;
}
참조 http://stackoverflow.com/questions/1601872/corrupt-image-file-after-uploading-it-using-ftp-command-from-linux-with-type-as – Raedwald
http :// /stackoverflow.com/questions/6155905/in-what-situation-should-i-using-ascii-to-transfer-a-file-over-ftp-im-not-askin – Raedwald
참고 사항 [FTPClient - Java, 파일 업로드 ] (http://stackoverflow.com/questions/5925572/ftpclient-java-upload-file) – Raedwald