public static void fileZip(ZipOutputStream out, File file)
            throws UnsupportedEncodingException, FileNotFoundException,
            IOException {
        
        //
        if (file.isDirectory()) {
            //
            System.out.println("Dir:" + file.getName());
            for (File tmp : file.listFiles()) {
                fileZip(out, tmp);
            }
        } else {
            //
            System.out.println("path:" + file.getPath());
            System.out.println("    " + "File name:" + file.getName());
            //
            BufferedReader in = new BufferedReader(new InputStreamReader(
                    new FileInputStream(file), "ISO8859_1"));
            
            // 因直接讀取資料夾時,壓縮後會多一層parent folder.
            // 所以在這做了特別的處理來取得欲壓縮的目錄及檔案.
            String yyy = file.getPath().substring(file.getPath().indexOf("\\")+1);
            System.out.println("yyy:" + yyy);
            
            out.putNextEntry(new ZipEntry(yyy));
            int c;
            while ((c = in.read()) != -1) {
                out.write(c);
            }
            
            in.close();
        }
        
    }