base.backup
Class BackupFactory

java.lang.Object
  extended by base.backup.BackupFactory

public class BackupFactory
extends java.lang.Object


Constructor Summary
BackupFactory()
           
 
Method Summary
static void backupToZipArchive(Backup backup)
           
static java.io.File createDetailsFile(Backup backup)
           
static long fileSizeInKB(java.io.File file)
           
static Backup newBackup(java.lang.String name, java.lang.String description, java.util.Date date, java.lang.String dbLocationPath, java.lang.String zipLocationPath)
           
static Backup newBackupFromZipArchive(java.io.File backupFile)
           
static void unzip(java.util.zip.ZipInputStream zin, java.lang.String zipEntry, java.io.File destinationFolder)
           
static void unZipFile(java.util.zip.ZipFile zipFile, java.io.File destinationDirectory)
           
static void zipDirectory(java.io.File file, java.util.zip.ZipOutputStream out)
           
static void zipFile(java.io.File file, java.util.zip.ZipOutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackupFactory

public BackupFactory()
Method Detail

newBackup

public static Backup newBackup(java.lang.String name,
                               java.lang.String description,
                               java.util.Date date,
                               java.lang.String dbLocationPath,
                               java.lang.String zipLocationPath)

newBackupFromZipArchive

public static Backup newBackupFromZipArchive(java.io.File backupFile)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

createDetailsFile

public static java.io.File createDetailsFile(Backup backup)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

backupToZipArchive

public static void backupToZipArchive(Backup backup)
                               throws java.lang.Exception
Throws:
java.lang.Exception

zipDirectory

public static void zipDirectory(java.io.File file,
                                java.util.zip.ZipOutputStream out)
                         throws java.lang.Exception
Throws:
java.lang.Exception

zipFile

public static void zipFile(java.io.File file,
                           java.util.zip.ZipOutputStream out)
                    throws java.lang.Exception
Throws:
java.lang.Exception

unZipFile

public static void unZipFile(java.util.zip.ZipFile zipFile,
                             java.io.File destinationDirectory)
                      throws java.lang.Exception
Throws:
java.lang.Exception

unzip

public static void unzip(java.util.zip.ZipInputStream zin,
                         java.lang.String zipEntry,
                         java.io.File destinationFolder)
                  throws java.io.IOException
Throws:
java.io.IOException

fileSizeInKB

public static long fileSizeInKB(java.io.File file)


Copyright © 2006 SF.net. All Rights Reserved.