com.izforge.izpack.installer
Class Unpacker

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.izforge.izpack.installer.Unpacker
All Implemented Interfaces:
java.lang.Runnable

public class Unpacker
extends java.lang.Thread

Unpacker class.

Author:
Julien Ponge, Johannes Lehtinen

Field Summary
private  AbstractUIProgressHandler handler
          The installer listener.
private  AutomatedInstallData idata
          The installdata.
private static java.util.ArrayList instances
          The instances of the unpacker objects.
private  java.lang.String jarLocation
          The jar location.
private  UninstallData udata
          The uninstallation data.
private  VariableSubstitutor vs
          The variables substitutor.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Unpacker(AutomatedInstallData idata, AbstractUIProgressHandler handler)
          The constructor.
 
Method Summary
private  java.io.InputStream getPackAsStream(int n)
          Returns a stream to a pack, depending on the installation kind.
static java.util.ArrayList getRunningInstances()
          Returns the active unpacker instances.
private  void putUninstaller()
          Puts the uninstaller.
 void run()
          The run method.
private  java.lang.String translatePath(java.lang.String destination)
          Translates a relative path to a local system path.
 
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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

idata

private AutomatedInstallData idata
The installdata.


handler

private AbstractUIProgressHandler handler
The installer listener.


udata

private UninstallData udata
The uninstallation data.


jarLocation

private java.lang.String jarLocation
The jar location.


vs

private VariableSubstitutor vs
The variables substitutor.


instances

private static java.util.ArrayList instances
The instances of the unpacker objects.

Constructor Detail

Unpacker

public Unpacker(AutomatedInstallData idata,
                AbstractUIProgressHandler handler)
The constructor.

Parameters:
idata - The installation data.
handler - The installation progress handler.
Method Detail

getRunningInstances

public static java.util.ArrayList getRunningInstances()
Returns the active unpacker instances.

Returns:
The active unpacker instances.

run

public void run()
The run method.


putUninstaller

private void putUninstaller()
                     throws java.lang.Exception
Puts the uninstaller.

Throws:
java.lang.Exception - Description of the Exception

getPackAsStream

private java.io.InputStream getPackAsStream(int n)
                                     throws java.lang.Exception
Returns a stream to a pack, depending on the installation kind.

Parameters:
n - The pack number.
Returns:
The stream.
Throws:
java.lang.Exception - Description of the Exception

translatePath

private java.lang.String translatePath(java.lang.String destination)
Translates a relative path to a local system path.

Parameters:
destination - The path to translate.
Returns:
The translated path.