edu.wisc.ssec.mcidasv.util
Class BackgroundUnzipper

java.lang.Object
  extended by javax.swing.SwingWorker<Long,Long>
      extended by edu.wisc.ssec.mcidasv.util.BackgroundUnzipper
All Implemented Interfaces:
Runnable, Future<Long>, RunnableFuture<Long>

public class BackgroundUnzipper
extends SwingWorker<Long,Long>


Nested Class Summary
static class BackgroundUnzipper.CountingInputStream
           
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
 
Field Summary
private  BackgroundUnzipper.CountingInputStream countingStream
           
private  String currentEntry
           
private  ActionListener taskPerformer
           
private  Timer taskTimer
           
private  long totalSize
           
private  String zipFile
           
private  ZipInputStream zipStream
           
 
Constructor Summary
BackgroundUnzipper(String zipFile)
           
 
Method Summary
protected  Long doInBackground()
           
 Long getCurrentBytes()
           
 String getCurrentEntry()
           
private  InputStream getInputStream(String path)
           
 long getPercentage()
           
protected  void process(List<Long> durr)
           
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, done, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

zipFile

private final String zipFile

countingStream

private BackgroundUnzipper.CountingInputStream countingStream

zipStream

private ZipInputStream zipStream

totalSize

private long totalSize

currentEntry

private String currentEntry

taskPerformer

private final ActionListener taskPerformer

taskTimer

private final Timer taskTimer
Constructor Detail

BackgroundUnzipper

public BackgroundUnzipper(String zipFile)
Method Detail

getCurrentBytes

public Long getCurrentBytes()

getCurrentEntry

public String getCurrentEntry()

getPercentage

public long getPercentage()

doInBackground

protected Long doInBackground()
                       throws Exception
Specified by:
doInBackground in class SwingWorker<Long,Long>
Throws:
Exception

process

protected void process(List<Long> durr)
Overrides:
process in class SwingWorker<Long,Long>

getInputStream

private InputStream getInputStream(String path)