其實我們調用Java代碼zip文件
例如:
&buffer = CreateJavaArray("byte[]", 18024);
&zipStream = CreateJavaObject("java.util.zip.ZipOutputStream", CreateJavaObject("java.io.FileOutputStream", &outDir | &outZip));
For &i = 1 To &inFiles.Len
&zipStream.putNextEntry(CreateJavaObject("java.util.zip.ZipEntry", &inFiles [&i]));
&inStream = CreateJavaObject("java.io.FileInputStream", &outDir | &inFiles [&i]);
&len = &inStream.read(&buffer);
While &len > 0;
&zipStream.write(&buffer, 0, &len);
&len = &inStream.read(&buffer);
End-While;
&zipStream.closeEntry();
&inStream.close();
End-For;
&zipStream.close();