com.izforge.izpack.installer.unpacker
Class AbstractPackResources

java.lang.Object
  extended by com.izforge.izpack.installer.unpacker.AbstractPackResources
All Implemented Interfaces:
PackResources
Direct Known Subclasses:
ConsolePackResources, GUIPackResources

public abstract class AbstractPackResources
extends Object
implements PackResources

Abstract implementation of the PackResources interface.

Author:
Tim Anderson

Field Summary
protected static String WEB_TEMP_SUB_PATH
          Temporary directory for web installers.
 
Constructor Summary
AbstractPackResources(Resources resources, InstallData installData)
          Constructs an AbstractPackResources.
 
Method Summary
 InputStream getInputStream(String name)
          Returns the stream to a resource.
protected  InstallData getInstallData()
          Returns the installation data.
 InputStream getPackStream(String name)
          Returns the stream to a resource.
protected abstract  InputStream getWebPackStream(String name, String webDirURL)
          Returns the stream to a web-based pack resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEB_TEMP_SUB_PATH

protected static final String WEB_TEMP_SUB_PATH
Temporary directory for web installers.

See Also:
Constant Field Values
Constructor Detail

AbstractPackResources

public AbstractPackResources(Resources resources,
                             InstallData installData)
Constructs an AbstractPackResources.

Parameters:
resources - the resources
installData - the installation data
Method Detail

getPackStream

public InputStream getPackStream(String name)
Returns the stream to a resource.

Specified by:
getPackStream in interface PackResources
Parameters:
name - the resource name
Returns:
a stream to the resource
Throws:
ResourceNotFoundException - if the resource cannot be found
ResourceInterruptedException - if resource retrieval is interrupted
ResourceException - for any other resource error

getInputStream

public InputStream getInputStream(String name)
Returns the stream to a resource.

Specified by:
getInputStream in interface PackResources
Parameters:
name - the resource name
Returns:
a stream to the resource
Throws:
ResourceNotFoundException - if the resource cannot be found
ResourceException - for any other resource error

getWebPackStream

protected abstract InputStream getWebPackStream(String name,
                                                String webDirURL)
Returns the stream to a web-based pack resource.

Parameters:
name - the resource name
webDirURL - the web URL to load the resource from
Returns:
a stream to the resource
Throws:
ResourceNotFoundException - if the resource cannot be found
ResourceInterruptedException - if resource retrieval is interrupted

getInstallData

protected InstallData getInstallData()
Returns the installation data.

Returns:
the installation data


Copyright © 2018. All rights reserved.