edu.uiuc.ndiipp.hubandspoke.utils
Class HaSZipUtils

java.lang.Object
  extended by edu.uiuc.ndiipp.hubandspoke.utils.HaSZipUtils

public class HaSZipUtils
extends java.lang.Object


Constructor Summary
HaSZipUtils()
           
 
Method Summary
static void addFilesToZip(java.io.File[] f, java.util.zip.ZipOutputStream zip)
           
static void addFilesToZip(java.io.File f, java.util.zip.ZipOutputStream zip)
           
static void addFilesToZip(java.io.InputStream in, java.util.zip.ZipOutputStream zip, java.lang.String filename)
           
static void addFileToExistingZip(java.io.File zipfile, java.io.File filetoadd)
          Adds the supplied file to the supplied zip file -- for cases where a zip is already on the filesystem (as is the case with the dissemination from DSpace).
static java.io.File unzip(java.util.zip.ZipFile zip, java.lang.String path)
           
static java.io.File unzip(java.util.zip.ZipInputStream zip, java.lang.String path)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HaSZipUtils

public HaSZipUtils()
Method Detail

addFilesToZip

public static void addFilesToZip(java.io.File f,
                                 java.util.zip.ZipOutputStream zip)
                          throws java.io.IOException
Throws:
java.io.IOException

addFilesToZip

public static void addFilesToZip(java.io.File[] f,
                                 java.util.zip.ZipOutputStream zip)
                          throws java.io.IOException
Throws:
java.io.IOException

addFilesToZip

public static void addFilesToZip(java.io.InputStream in,
                                 java.util.zip.ZipOutputStream zip,
                                 java.lang.String filename)
                          throws java.io.IOException
Throws:
java.io.IOException

unzip

public static java.io.File unzip(java.util.zip.ZipInputStream zip,
                                 java.lang.String path)
                          throws java.io.FileNotFoundException,
                                 java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

unzip

public static java.io.File unzip(java.util.zip.ZipFile zip,
                                 java.lang.String path)
                          throws java.io.IOException
Throws:
java.io.IOException

addFileToExistingZip

public static void addFileToExistingZip(java.io.File zipfile,
                                        java.io.File filetoadd)
                                 throws java.io.IOException
Adds the supplied file to the supplied zip file -- for cases where a zip is already on the filesystem (as is the case with the dissemination from DSpace).

Parameters:
zipfile -
filetoadd -
Throws:
java.io.IOException


Copyright © 2006, University of Illinois.