0
FTPClient ftpClient;

ZipOutputStream zipOut = null;   
zipOut = new ZipOutputStream(ftpClient.storeFileStream("a.zip")); 

String str;
byte []conarr=str.getBytes();

zipOut.putNextEntry(new ZipEntry("1.txt")); 
zipOut.write(conarr);
zipOut.close();

str文字が数文字しかない場合は問題ありませんがstr、数十kBの場合は、zipファイルにエラーがあります。

4

0 に答える 0