简体   繁体   English

使用Apache FTP客户端有时会中断下载PDF

[英]Download PDF was broken sometimes by using Apache FTP client

I'm using Apache's commons-net-2.2.jar to download a batch of files from a FTP server, the files which list on FTP are gziped file and the PDFfile was in it, and all of these files can unzip and open correctly. 我正在使用Apache的commons-net-2.2.jar从FTP服务器下载一批文件,FTP上列出的文件是gziped文件,而PDFfile在其中,所有这些文件都可以解压缩并正确打开。 But, after download those files to my local, some of files can not be opened, it shows the message of "the file is broken" when I unziped the file, and finally the PDF file can not be opened correctly which will be showing the message of "Can not find the charset of * ". 但是,将这些文件下载到本地后,无法打开某些文件,将其解压缩后会显示“文件已损坏”的消息,最后无法正确打开PDF文件,这将显示消息“找不到*的字符集”。

I'm wondering what the root cause of this issue could be. 我想知道这个问题的根本原因是什么。

That sounds a bit strange. 听起来有点奇怪。 Check that you are specifically telling the FTP server that you want to use "binary" mode for the transfer. 检查您是否明确告诉FTP服务器要使用“二进制”模式进行传输。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM