Linux « Zip « Java I/O Q&A





1. Create Zip File In Windows and Extract Zip File In Linux    stackoverflow.com

I had created a zip file (together with directory) under Windows as follow (Code are picked from http://www.exampledepot.com/egs/java.util.zip/CreateZip.html) :

package sandbox;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

/**
 *
 * @author ...

2. Problem when compressing SWF in Linux with java.util.zip    stackoverflow.com

I've created a servlet that changes the binaries of a SWF file and output it to the user. The SWF is compressed by ZLIB by default. Then I inflate, change the ...

3. Zip - Add files and folders that are newer, remove old ones    stackoverflow.com

I want to do the following on a Windows and Linux machine :

  • Zip several folders in an automated process
  • Add new files to archive, remove old ones.
I've experimented with .bat and .sh ...

4. Spawned zip process doesn't seem to add file to archive    stackoverflow.com

I am trying to add a text file to a zip archive through a Java program on Linux. The program spawns a process (using java.lang.Process) to execute the commandline "zip -j ...

5. issue with the zip file when downloaded from linux to windows    coderanch.com

Hi All, I have a problem with the file downloaded from linux to windows which is zipped using tar cmd. it is downloaded perfectly. when i try to unzip it in windows, it shows an alert saying some bytes are missing. how to resolve this issue. thanks in advance. i am using org.apache.commons.net.ftp.FTPClient. I am using this method objClient.retrieveFile(source + strNewFileName, ...

6. Differences on Windows and Linux JVM about java.util.zip package    forums.oracle.com

Hello, there! I need some help if someone else has already face this problem. I have a Java server that process the bytes of a SWF File stored in the server and ouptut it to the user through a Servlet. The file was decompressed and re-compressed using the java.util.zip package (Deflater/Inflater). Everything works fine on Windows Server 2008 server. But now ...

7. Create Zip File In Windows and Extract Zip File In Linux    forums.oracle.com

Your solution lies in the File.separator constant; this constant will contain the path separator that is used by the operating system. No need to hardcode one, Java already has it. edit: when it comes to paths by the way, I have the bad habit of always using the front slash ( / ). This will also work under Windows and has ...