earutils.expander
Class Expander

java.lang.Object
  extended byearutils.expander.Expander

public class Expander
extends java.lang.Object

Author:
Sean C. Sullivan

Field Summary
protected  java.util.Set expansionExtensions
           
protected  java.util.Set listeners
           
protected  java.lang.String outputPath
           
 
Constructor Summary
Expander()
           
 
Method Summary
 void addExpanderListener(ExpanderListener l)
           
protected  void createFile(java.lang.String name, java.io.InputStream in, java.lang.String path)
           
protected  void doExpand(java.io.InputStream in, java.lang.String name, java.lang.String path)
           
 void expand(java.io.InputStream in, java.lang.String name)
           
 void expand(java.lang.String earFilename)
           
protected  void fireEntrySkippedEvent(java.lang.String entryName)
           
protected  void fireExpansionFinishedEvent(java.lang.String archiveName, boolean success, long duration)
           
protected  void fireExpansionStartedEvent(java.lang.String archiveName)
           
protected  void fireFileCreatedEvent(java.lang.String file)
           
 java.util.Set getExpansionExtensions()
           
 java.lang.String getOutputPath()
           
protected  boolean ignoreThisEntry(java.lang.String entryName)
           
protected  void processZipEntry(java.util.zip.ZipEntry zipEntry, java.io.InputStream is, java.lang.String path)
           
 void removeExpanderListener(ExpanderListener l)
           
 void setExpansionExtensions(java.util.Set s)
           
 void setOutputPath(java.lang.String path)
           
protected  boolean shouldExpand(java.lang.String name)
           
 java.lang.String toString()
           
protected  void validateEARFile(java.io.File earFile)
           
protected  void validateOutputPath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

expansionExtensions

protected java.util.Set expansionExtensions

outputPath

protected java.lang.String outputPath

listeners

protected java.util.Set listeners
Constructor Detail

Expander

public Expander()
Method Detail

addExpanderListener

public void addExpanderListener(ExpanderListener l)

removeExpanderListener

public void removeExpanderListener(ExpanderListener l)

fireExpansionStartedEvent

protected void fireExpansionStartedEvent(java.lang.String archiveName)

fireExpansionFinishedEvent

protected void fireExpansionFinishedEvent(java.lang.String archiveName,
                                          boolean success,
                                          long duration)

fireEntrySkippedEvent

protected void fireEntrySkippedEvent(java.lang.String entryName)

fireFileCreatedEvent

protected void fireFileCreatedEvent(java.lang.String file)

setExpansionExtensions

public void setExpansionExtensions(java.util.Set s)

getExpansionExtensions

public java.util.Set getExpansionExtensions()

setOutputPath

public void setOutputPath(java.lang.String path)

getOutputPath

public java.lang.String getOutputPath()

expand

public void expand(java.lang.String earFilename)
            throws java.io.IOException
Throws:
java.io.IOException

validateOutputPath

protected void validateOutputPath()

validateEARFile

protected void validateEARFile(java.io.File earFile)

expand

public void expand(java.io.InputStream in,
                   java.lang.String name)
            throws java.io.IOException
Throws:
java.io.IOException

doExpand

protected void doExpand(java.io.InputStream in,
                        java.lang.String name,
                        java.lang.String path)
                 throws java.io.IOException
Parameters:
in -
name -
path -
Throws:
java.io.IOException - The caller is responsible for closing the InputStream

ignoreThisEntry

protected boolean ignoreThisEntry(java.lang.String entryName)

processZipEntry

protected void processZipEntry(java.util.zip.ZipEntry zipEntry,
                               java.io.InputStream is,
                               java.lang.String path)
                        throws java.io.IOException
Throws:
java.io.IOException

createFile

protected void createFile(java.lang.String name,
                          java.io.InputStream in,
                          java.lang.String path)
                   throws java.io.IOException
Throws:
java.io.IOException

shouldExpand

protected boolean shouldExpand(java.lang.String name)

toString

public java.lang.String toString()


Copyright © 2004 earutils.sourceforge.net. All Rights Reserved.