|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjfileupload.transfer.client.core.ArchiveFilter
public class ArchiveFilter
Archive files into a ZIP archive. Known limitation : Non-ASCII characters such as ÄÜäöüùéàè... are ZIP tools dependent. See : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4244499 SUN ZIP implementation stores non-ASCII characters as UTF-8. JAVA_HOME/bin/jar.exe tool is able to unzip them. WinZip can't.
Field Summary | |
---|---|
static int |
BUFFERSIZE
|
protected boolean |
cancelled
|
protected java.lang.String |
comment
|
protected java.lang.String |
countrenamed
|
java.lang.String |
ENTRIES_RENAMED
|
protected java.lang.String |
extension
|
protected java.lang.String |
fullname
|
protected java.lang.String |
identifier
|
protected int |
level
|
protected java.util.Properties |
props
|
protected java.lang.String |
template
|
Constructor Summary | |
---|---|
ArchiveFilter(Conf cnf)
Constructor. |
Method Summary | |
---|---|
protected void |
addFile(java.io.File file,
java.util.zip.ZipOutputStream zos,
byte[] buffer)
Add file to compress. |
protected void |
addFolder(java.util.zip.ZipOutputStream zos,
java.io.File folder,
java.io.File rootFolder,
byte[] buffer,
long level,
long depth)
Compress folder recursively. |
void |
cancel()
Cancel archive creation. |
void |
clean()
Delete temporary ZIP archive. |
java.lang.Object |
execute(java.lang.Object input)
Execute the Filter such as file content checking or modification. |
void |
init(TransferController tc,
java.lang.String id)
Initialize Filter such as loading configuration file. |
protected void |
loadParameters()
Load Filter parameters. |
protected void |
notifyOnComplete(java.io.File output,
java.lang.String txt)
Notify Filter listeners about complete. |
protected void |
notifyOnFail(ClientException e)
Notify Filter listeners about failure. |
protected void |
notifyOnStarted(java.io.File input,
java.lang.String txt)
Notify Filter listeners about filter status = started. |
protected void |
notifyOnStarting(java.lang.Object input,
java.lang.String txt)
Notify Filter listeners about filter status = starting. |
protected java.io.File |
processCompress(java.util.List list)
Compress files and folders selected. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int BUFFERSIZE
public java.lang.String ENTRIES_RENAMED
protected java.lang.String identifier
protected java.util.Properties props
protected int level
protected java.lang.String comment
protected java.lang.String extension
protected java.lang.String fullname
protected java.lang.String template
protected java.lang.String countrenamed
protected boolean cancelled
Constructor Detail |
---|
public ArchiveFilter(Conf cnf)
cnf
- Method Detail |
---|
public void init(TransferController tc, java.lang.String id) throws ClientException
TransferFilter
init
in interface TransferFilter
id
- identifier
ClientException
protected void loadParameters()
public java.lang.Object execute(java.lang.Object input) throws ClientException
TransferFilter
execute
in interface TransferFilter
ClientException
public void clean()
clean
in interface TransferFilter
protected java.io.File processCompress(java.util.List list) throws ClientException
list
-
ClientException
protected void addFile(java.io.File file, java.util.zip.ZipOutputStream zos, byte[] buffer) throws java.io.IOException
file
- zos
- buffer
-
java.io.IOException
protected void addFolder(java.util.zip.ZipOutputStream zos, java.io.File folder, java.io.File rootFolder, byte[] buffer, long level, long depth) throws java.io.IOException
zos
- ZipOutputStreamfolder
- FilerootFolder
- Filebuffer
- byte[]level
- depth
-
java.io.IOException
public void cancel()
protected void notifyOnStarting(java.lang.Object input, java.lang.String txt)
input
- txt
- protected void notifyOnStarted(java.io.File input, java.lang.String txt)
input
- txt
- protected void notifyOnComplete(java.io.File output, java.lang.String txt)
output
- txt
- protected void notifyOnFail(ClientException e)
output
- txt
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |