org.kuali.ole.utility
Class CompressUtils

java.lang.Object
  extended by org.kuali.ole.utility.CompressUtils

public class CompressUtils
extends Object

Class for Utility operations on File Compression.

Author:
Rajesh Chowdary K

Constructor Summary
CompressUtils()
           
 
Method Summary
 File createZipFile(File sourceDir)
          Method to zip all files in a given directory.
 File createZippedBagFile(File sourceDir)
          Method to create a zipped bag file from a given source directory.
 void deleteFiles(List<File> files)
           
 File extractZippedBagFile(String bagFilePath, String toDir)
          Method to extract a given zipped bag file to a given output directory or to a temp directory if toDir is null.
 ArrayList<File> getAllFilesList(File directory)
          Method to get All Files List in a given directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompressUtils

public CompressUtils()
Method Detail

createZipFile

public File createZipFile(File sourceDir)
                   throws IOException
Method to zip all files in a given directory.

Parameters:
sourceDir -
Returns:
Throws:
IOException

createZippedBagFile

public File createZippedBagFile(File sourceDir)
                         throws IOException
Method to create a zipped bag file from a given source directory.

Parameters:
sourceDir -
Returns:
Throws:
IOException

extractZippedBagFile

public File extractZippedBagFile(String bagFilePath,
                                 String toDir)
                          throws IOException
Method to extract a given zipped bag file to a given output directory or to a temp directory if toDir is null.

Parameters:
bagFilePath -
toDir -
Returns:
Throws:
IOException

getAllFilesList

public ArrayList<File> getAllFilesList(File directory)
Method to get All Files List in a given directory.

Parameters:
directory -
Returns:

deleteFiles

public void deleteFiles(List<File> files)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.