javazoom.upload
Class Archiver

java.lang.Object
  |
  +--javazoom.upload.Archiver

public class Archiver
extends java.lang.Object

This class (singleton) implements a simple ZIP Archiver.


Field Summary
static int BUFFERSIZE
          Buffer size for internal tranfert : Default value = 4096
 
Method Summary
 java.lang.String append(java.lang.String zipFile, UploadFile file, int maxFiles, boolean overwrite)
          Appends a file to a ZIP archive.
static Archiver getInstance()
          Returns the only one instance of Archiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFERSIZE

public static int BUFFERSIZE
Buffer size for internal tranfert : Default value = 4096

Method Detail

getInstance

public static Archiver getInstance()
Returns the only one instance of Archiver.


append

public java.lang.String append(java.lang.String zipFile,
                               UploadFile file,
                               int maxFiles,
                               boolean overwrite)
                        throws UploadException,
                               java.io.IOException
Appends a file to a ZIP archive.
archive.zip is moved to archive.tmp.zip before regenerating archive.zip with the new file.

Parameters:
zipFile - ZIP filename
file -
maxFiles -
overwrite -
Returns:
altfilename or null
Throws:
UploadException
java.io.IOException