org.alltimeflashdreamer.filelister
Class FileListerZipBuilder

java.lang.Object
  extended byorg.alltimeflashdreamer.util.zip.ZipBuilder
      extended byorg.alltimeflashdreamer.filelister.FileListerZipBuilder

class FileListerZipBuilder
extends org.alltimeflashdreamer.util.zip.ZipBuilder

Title: ZipBuilder

Description: Builds a zip file out of the source received within the constructor. This source is either a list of files/directories, together with a target output stream or just a directory string (two different constructors). The first one is to be used from the web GUI, the second from the command line.

Organization: All Time Flash Dreamer

Version:
0.5.1
Author:
Copyright (c) 2002-2004 by Florian Steinsiepe

Field Summary
 
Fields inherited from class org.alltimeflashdreamer.util.zip.ZipBuilder
os, zos
 
Constructor Summary
(package private) FileListerZipBuilder(FileListerConfig fileListerConfig, OutputStream os)
          Creates a new zip file in the nominated temp directory of the config class.
 
Method Summary
(package private)  void buildZip(File[] fileOrDirList, FileListerConfig fileListerConfig)
          Initializer method for the access of this class by the ZipBuilderThread.
 
Methods inherited from class org.alltimeflashdreamer.util.zip.ZipBuilder
addFileToZip, closeOutputStreams, getComments, getCurrentArchiveSize, getCurrentlyAddedFile, getFileName, getOverallPackingRatio, getProcessedFilesCount, getSizeOfProcessedFiles, getVisibleName, main, recurseAndZipDirectory, zipListOfFileObjects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileListerZipBuilder

FileListerZipBuilder(FileListerConfig fileListerConfig,
                     OutputStream os)
               throws FileListerException
Creates a new zip file in the nominated temp directory of the config class. The name of this new file is stored for later returning through the getZipFileName method.

Parameters:
fileListerConfig - the often used config class
os - the output stream to connect the ZipOutputStream to
Throws:
FileListerException - wrapper for each possible "foreseen" exception
Method Detail

buildZip

void buildZip(File[] fileOrDirList,
              FileListerConfig fileListerConfig)
        throws FileListerException
Initializer method for the access of this class by the ZipBuilderThread. It calls the addFileToZip and the recurseAndZipDirectory methods for each entry of the given list of files and directories.

Parameters:
fileOrDirList - list of File objects representing the files and directories that shall be added to the new zip file
fileListerConfig - the magic config object
Throws:
FileListerException - if something went wrong with the zip building