|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.alltimeflashdreamer.filelister.ZipBuilderThread
Title: ZipBuilderThread
Description: Starts and controls the generation of a zip file using the ZipBuilder class. While the zip builder runs it's job, this thread collects the created output and provides it to the FileListerDownloadServlet which then shows a comment site to the client.
Organization: All Time Flash Dreamer
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
(package private) |
ZipBuilderThread(FileListerConfig fileListerConfig,
ArrayList arrayFileListerEntries)
The constructor stores the given pointers and generates a random-based zip file name. |
Method Summary | |
protected void |
finalize()
Override of Object's finalize method: Makes sure that the generated zip is deleted before this class is finalized. |
(package private) ArrayList |
getComments()
Returns the list of the collected comments of the ZipBuilder while zipping directories and adding file to the zip. |
(package private) long |
getCurrentArchiveSize()
Simple accessor method for ZipBuilder's getCurrentArchiveSize() method. |
(package private) String |
getCurrentlyAdding()
Simple accessor method for ZipBuilder's getCurrentlyAddedFile() method. |
(package private) String |
getFilesDone()
Returns the amount of processed files and the total amount of files to be added to the zip. |
(package private) double |
getOverallPackingRatio()
Simple accessor method for ZipBuilder's getOverallPackingRatio() method. |
(package private) double |
getProgressPercentage()
Returns the result of the division of the size of the processed files and the total size of files to be processed. |
(package private) String |
getSizeDone()
Returns the amount of bytes already processed and the total amount of bytes to be processed. |
(package private) String |
getTimeElapsed()
Returns the amount of elapsed time and the expected amount or remaining time. |
(package private) ArrayList |
getWarnings()
|
(package private) String |
getZipFileName()
Returns the name of the generated zip file for having access to it before streaming it to the client. |
(package private) boolean |
hasHundredPercentPageBeenShown()
Returns whether the final / 100% page has already been shown or not. |
(package private) boolean |
isReadyToStream()
Returns whether the run method successfully completed the zip file. |
(package private) void |
markForCleanUp()
Sets the "mark for clean-up" boolean. |
void |
run()
Opens a buffered file output stream to the file having the previously generated zip file name and calls the ZipBuilder constructor using this output stream as well as the file list and the config object received in the constructor. |
(package private) void |
setHundredPercentPageWasShown()
Tells that the final / 100% page has now been shown. |
(package private) void |
streamZipFile(HttpServletResponse response)
Opens a buffered file input stream and connects it to the given response's output stream. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
ZipBuilderThread(FileListerConfig fileListerConfig, ArrayList arrayFileListerEntries) throws FileListerException
fileListerConfig
- the magic config objectarrayFileListerEntries
- list of selected FileListerEntry objects
FileListerException
- if the list of entries can't be transformed
into a list of File objectsMethod Detail |
public void run()
getZipFileName()
protected void finalize() throws Throwable
Throwable
- as defined in Object, but not usedArrayList getComments()
String getZipFileName()
void streamZipFile(HttpServletResponse response) throws IOException
response
- where to get the output stream from
IOException
- only if the redirect to the error site throws
an IOException, i.e. within the method's own catch blockboolean isReadyToStream()
double getProgressPercentage()
long getCurrentArchiveSize()
ZipBuilder.getCurrentArchiveSize()
double getOverallPackingRatio()
ZipBuilder.getOverallPackingRatio()
String getFilesDone()
String getSizeDone()
String getCurrentlyAdding()
ZipBuilder.getCurrentlyAddedFile()
String getTimeElapsed()
ArrayList getWarnings()
boolean hasHundredPercentPageBeenShown()
void setHundredPercentPageWasShown()
void markForCleanUp()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |