org.apache.jetspeed.util
Class JarHelper

java.lang.Object
  extended by org.apache.jetspeed.util.AbstractFileSystemHelper
      extended by org.apache.jetspeed.util.JarHelper
All Implemented Interfaces:
org.apache.jetspeed.util.FileSystemHelper

public class JarHelper
extends AbstractFileSystemHelper
implements org.apache.jetspeed.util.FileSystemHelper

Author:
Scott T. Weaver Creates a a temp directory to which a JarFile is expanded and can be manipulated. All operations are performed by an internal instance of DirectoryHelper.

Field Summary
private  boolean deleteOnClose
           
protected  DirectoryHelper dirHelper
           
protected  File file
           
protected  JarFile jarFile
           
protected  File jarRoot
           
 
Constructor Summary
JarHelper(File file, boolean deleteOnClose)
           
 
Method Summary
 void close()
           close
protected  void copyEntryToFile(JarFile jarFile, File jarRoot, JarEntry jarEntry)
           copyEntryToFile
 void copyFrom(File directory)
           copyFrom
 void copyFrom(File directory, FileFilter fileFilter)
           copyFrom
 File getRootDirectory()
           getRootDirectory
 String getSourcePath()
           getSourcePath
 boolean remove()
           remove
 
Methods inherited from class org.apache.jetspeed.util.AbstractFileSystemHelper
getChecksum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jetspeed.util.FileSystemHelper
getChecksum
 

Field Detail

jarFile

protected JarFile jarFile

dirHelper

protected DirectoryHelper dirHelper

file

protected File file

deleteOnClose

private boolean deleteOnClose

jarRoot

protected File jarRoot
Constructor Detail

JarHelper

public JarHelper(File file,
                 boolean deleteOnClose)
          throws IOException
Parameters:
jarFile -
Throws:
IOException
Method Detail

copyEntryToFile

protected void copyEntryToFile(JarFile jarFile,
                               File jarRoot,
                               JarEntry jarEntry)
                        throws IOException,
                               FileNotFoundException

copyEntryToFile

Parameters:
jarFile -
jarRoot -
jarEntry -
Throws:
IOException
FileNotFoundException

copyFrom

public void copyFrom(File directory,
                     FileFilter fileFilter)
              throws IOException

copyFrom

Specified by:
copyFrom in interface org.apache.jetspeed.util.FileSystemHelper
Parameters:
directory -
fileFilter -
Throws:
IOException

copyFrom

public void copyFrom(File directory)
              throws IOException

copyFrom

Specified by:
copyFrom in interface org.apache.jetspeed.util.FileSystemHelper
Parameters:
directory -
Throws:
IOException
See Also:
FileSystemHelper.copyFrom(java.io.File)

getRootDirectory

public File getRootDirectory()

getRootDirectory

Specified by:
getRootDirectory in interface org.apache.jetspeed.util.FileSystemHelper
Specified by:
getRootDirectory in class AbstractFileSystemHelper
Returns:
See Also:
FileSystemHelper.getRootDirectory()

remove

public boolean remove()

remove

Specified by:
remove in interface org.apache.jetspeed.util.FileSystemHelper
Returns:
See Also:
FileSystemHelper.remove()

close

public void close()
           throws IOException

close

Specified by:
close in interface org.apache.jetspeed.util.FileSystemHelper
Throws:
IOException
See Also:
FileSystemHelper.close()

getSourcePath

public String getSourcePath()

getSourcePath

Specified by:
getSourcePath in interface org.apache.jetspeed.util.FileSystemHelper
Returns:
See Also:
FileSystemHelper.getSourcePath()


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.