dutils.digger.processors
Class ExtractingProcessor

java.lang.Object
  |
  +--dutils.digger.processors.ExtractingProcessor
All Implemented Interfaces:
SearchProcessor

public class ExtractingProcessor
extends java.lang.Object
implements SearchProcessor

This SearchProcessor extracts matching entries into a given directory.

Author:
Daniel Or

Constructor Summary
ExtractingProcessor(java.io.File outputDir)
          Creates a new ExtractingProcessor.
ExtractingProcessor(java.lang.String outputDir)
          Creates a new ExtractingProcessor.
 
Method Summary
 java.io.File getOutputDir()
           
 boolean isKeepDirStructure()
           
 void process(java.io.File f)
          Used when a File that matches the search criteria is found.
 void process(java.io.File f, java.util.zip.ZipFile zFile, java.util.zip.ZipEntry zEntry)
          Used when a ZipEntry that matches the search criteria is found.
 void setKeepDirStructure(boolean b)
           
 void setOutputDir(java.io.File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtractingProcessor

public ExtractingProcessor(java.io.File outputDir)
Creates a new ExtractingProcessor.

Parameters:
outputDir - a directory to extract to.

ExtractingProcessor

public ExtractingProcessor(java.lang.String outputDir)
Creates a new ExtractingProcessor.

Parameters:
outputDir - a directory to extract to.
Method Detail

isKeepDirStructure

public boolean isKeepDirStructure()
Returns:

getOutputDir

public java.io.File getOutputDir()
Returns:

setKeepDirStructure

public void setKeepDirStructure(boolean b)
Parameters:
b -

setOutputDir

public void setOutputDir(java.io.File file)
Parameters:
file -

process

public void process(java.io.File f)
Description copied from interface: SearchProcessor
Used when a File that matches the search criteria is found.

Specified by:
process in interface SearchProcessor
Parameters:
f - a File to Process.

process

public void process(java.io.File f,
                    java.util.zip.ZipFile zFile,
                    java.util.zip.ZipEntry zEntry)
Description copied from interface: SearchProcessor
Used when a ZipEntry that matches the search criteria is found.

Specified by:
process in interface SearchProcessor
Parameters:
zFile - the ZipFile where the ZipEntry was found.
zEntry - a ZipEntry to process.
f - the actual file being processed (important for entries in nested archives).
See Also:
SearchProcessor.process(File, ZipFile, ZipEntry)