com.izforge.izpack.installer.multiunpacker
Class MultiVolumeUnpacker

java.lang.Object
  extended by com.izforge.izpack.installer.unpacker.UnpackerBase
      extended by com.izforge.izpack.installer.multiunpacker.MultiVolumeUnpacker
All Implemented Interfaces:
IUnpacker, Runnable

public class MultiVolumeUnpacker
extends UnpackerBase

Unpacker class for a multi volume installation.

Author:
Dennis Reil, , Tim Anderson

Field Summary
 
Fields inherited from class com.izforge.izpack.installer.unpacker.UnpackerBase
RESOURCES_PATH
 
Constructor Summary
MultiVolumeUnpacker(InstallData installData, PackResources resources, RulesEngine rules, VariableSubstitutor variableSubstitutor, UninstallData uninstallData, FileQueueFactory queue, Housekeeper housekeeper, InstallerListeners listeners, Prompt prompt, VolumeLocator locator, PlatformModelMatcher matcher)
          Constructs a MultiVolumeUnpacker.
 
Method Summary
protected  void cleanup()
          Invoked after unpacking has completed, in order to clean up.
protected  FileUnpacker createFileUnpacker(PackFile file, Pack pack, FileQueue queue, Cancellable cancellable)
          Creates an unpacker to unpack a pack file.
protected  void preUnpack(List<Pack> packs)
          Invoked prior to unpacking.
protected  void skip(InputStream stream, long bytes)
          Skips bytes in a stream.
protected  void skip(PackFile file, Pack pack, InputStream packInputStream)
          Skips a pack file.
 
Methods inherited from class com.izforge.izpack.installer.unpacker.UnpackerBase
checkInterrupt, createDirectory, extract, getInstallData, getPrompt, getResources, getResult, getStepName, getUninstallData, getVariableSubstitutor, handleOverrideRename, interrupt, isConditionTrue, isInterruptDisabled, isInterrupted, isOverwriteFile, performUpdateChecks, postUnpack, readExecutableFiles, readParsableFiles, readUpdateChecks, run, setDisableInterrupt, setProgressListener, setResult, shouldUnpack, unpack, unpack, unpack, unpack, writeInstallationInformation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiVolumeUnpacker

public MultiVolumeUnpacker(InstallData installData,
                           PackResources resources,
                           RulesEngine rules,
                           VariableSubstitutor variableSubstitutor,
                           UninstallData uninstallData,
                           FileQueueFactory queue,
                           Housekeeper housekeeper,
                           InstallerListeners listeners,
                           Prompt prompt,
                           VolumeLocator locator,
                           PlatformModelMatcher matcher)
Constructs a MultiVolumeUnpacker.

Parameters:
installData - the installation data
resources - the pack resources
rules - the rules engine
variableSubstitutor - the variable substituter
uninstallData - the uninstallation data
queue - the queue
housekeeper - the housekeeper
listeners - the listeners
prompt - the prompt
locator - the multi-volume locator
matcher - the platform-model matcher
Method Detail

preUnpack

protected void preUnpack(List<Pack> packs)
Invoked prior to unpacking.

This notifies the ProgressListener, and any registered listeners.

Overrides:
preUnpack in class UnpackerBase
Parameters:
packs - the packs to unpack
Throws:
IzPackException - for any error

createFileUnpacker

protected FileUnpacker createFileUnpacker(PackFile file,
                                          Pack pack,
                                          FileQueue queue,
                                          Cancellable cancellable)
                                   throws InstallerException
Creates an unpacker to unpack a pack file.

Overrides:
createFileUnpacker in class UnpackerBase
Parameters:
file - the pack file to unpack
pack - the parent pack
queue - the file queue. May be null
cancellable - determines if the unpacker should be cancelled
Returns:
the unpacker
Throws:
InstallerException - for any installer error

skip

protected void skip(PackFile file,
                    Pack pack,
                    InputStream packInputStream)
             throws IOException
Description copied from class: UnpackerBase
Skips a pack file.

Overrides:
skip in class UnpackerBase
Parameters:
file - the pack file
pack - the pack
packInputStream - the pack stream
Throws:
IOException - if the file cannot be skipped

skip

protected void skip(InputStream stream,
                    long bytes)
             throws IOException
Description copied from class: UnpackerBase
Skips bytes in a stream.

Overrides:
skip in class UnpackerBase
Parameters:
stream - the stream
bytes - the no. of bytes to skip
Throws:
IOException - for any I/O error, or if the no. of bytes skipped doesn't match that expected

cleanup

protected void cleanup()
Description copied from class: UnpackerBase
Invoked after unpacking has completed, in order to clean up.

Overrides:
cleanup in class UnpackerBase


Copyright © 2018. All rights reserved.