wt.step
Class StepPackager

java.lang.Object
  extended bywt.step.StepPackager
Direct Known Subclasses:
ZipStepPackager

public abstract class StepPackager
extends Object

Manages the compression and extraction of a number of related STEP data files into and out-of a single 'STEP Package' file. Implementations can support various compression and collection tools such as tar, gzip, pkzip.


Field Summary
private static StepPackager _packagerInstance
           
private static String STEP_PACKAGER_PROPERTY
           
protected static int WRITE_BUFFER_SIZE
          Size of the memory buffer used when copying files into the package file
 
Constructor Summary
StepPackager()
           
 
Method Summary
abstract  void createPackage(File packageFile, File contentDir, boolean includeDirectory, boolean deleteAsAdded)
           
abstract  void extractPackage(InputStream packageData, File contentDir)
           
abstract  String getPackageFileExtension()
           
static StepPackager getPackagerInstance()
          Access the instance of the packager class defined by the property: wt.step.stepPackager
abstract  String[] listPackageContents(InputStream packageData, boolean ignoreDirectories)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WRITE_BUFFER_SIZE

protected static final int WRITE_BUFFER_SIZE
Size of the memory buffer used when copying files into the package file

See Also:
Constant Field Values

STEP_PACKAGER_PROPERTY

private static final String STEP_PACKAGER_PROPERTY
See Also:
Constant Field Values

_packagerInstance

private static StepPackager _packagerInstance
Constructor Detail

StepPackager

public StepPackager()
Method Detail

createPackage

public abstract void createPackage(File packageFile,
                                   File contentDir,
                                   boolean includeDirectory,
                                   boolean deleteAsAdded)
                            throws FileNotFoundException,
                                   IOException
Throws:
FileNotFoundException
IOException

listPackageContents

public abstract String[] listPackageContents(InputStream packageData,
                                             boolean ignoreDirectories)
                                      throws IOException
Throws:
IOException

extractPackage

public abstract void extractPackage(InputStream packageData,
                                    File contentDir)
                             throws FileNotFoundException,
                                    IOException
Throws:
FileNotFoundException
IOException

getPackageFileExtension

public abstract String getPackageFileExtension()

getPackagerInstance

public static StepPackager getPackagerInstance()
                                        throws TransferException
Access the instance of the packager class defined by the property: wt.step.stepPackager

Throws:
TransferException