javazoom.upload
Class Archiver

java.lang.Object
  extended byjavazoom.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 tranfer : Default value = 4096
 
Method Summary
 java.lang.String append(java.lang.String zipFile, UploadFile file, int maxFiles, boolean overwrite, OverwriteFilter overwritefilter)
          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 tranfer : Default value = 4096

Method Detail

getInstance

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

Returns:
Archiver

append

public java.lang.String append(java.lang.String zipFile,
                               UploadFile file,
                               int maxFiles,
                               boolean overwrite,
                               OverwriteFilter overwritefilter)
                        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 - String
file - UploadFile
maxFiles - int
overwrite - boolean
overwritefilter - OverwriteFilter
Returns:
String
Throws:
UploadException
java.io.IOException