org.codehaus.plexus.components.io.resources
Class AbstractPlexusIoArchiveResourceCollection

java.lang.Object
  extended by org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
      extended by org.codehaus.plexus.components.io.resources.AbstractPlexusIoArchiveResourceCollection
All Implemented Interfaces:
PlexusIoArchivedResourceCollection, PlexusIoResourceCollection, org.codehaus.plexus.logging.LogEnabled
Direct Known Subclasses:
PlexusIoZipFileResourceCollection

public abstract class AbstractPlexusIoArchiveResourceCollection
extends AbstractPlexusIoResourceCollection
implements PlexusIoArchivedResourceCollection

Default implementation of PlexusIoFileResourceCollection for zip files, tar files, etc.

Author:
jwi

Field Summary
 
Fields inherited from interface org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection
DEFAULT_ROLE_HINT, ROLE
 
Constructor Summary
protected AbstractPlexusIoArchiveResourceCollection()
           
protected AbstractPlexusIoArchiveResourceCollection(org.codehaus.plexus.logging.Logger logger)
           
 
Method Summary
protected abstract  java.util.Iterator getEntries()
          Returns an iterator over the archives entries.
 java.io.File getFile()
          Returns the zip file
 long getLastModified()
          Returns the collections last modification time.
 java.util.Iterator getResources()
          Returns an iterator over the resources in the collection.
 void setFile(java.io.File file)
          Sets the zip file
 
Methods inherited from class org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
enableLogging, getExcludes, getFileMappers, getFileSelectors, getIncludes, getLogger, getName, getPrefix, isCaseSensitive, isIncludingEmptyDirectories, isSelected, isUsingDefaultExcludes, setCaseSensitive, setExcludes, setFileMappers, setFileSelectors, setIncludes, setIncludingEmptyDirectories, setPrefix, setUsingDefaultExcludes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection
getName
 

Constructor Detail

AbstractPlexusIoArchiveResourceCollection

protected AbstractPlexusIoArchiveResourceCollection()

AbstractPlexusIoArchiveResourceCollection

protected AbstractPlexusIoArchiveResourceCollection(org.codehaus.plexus.logging.Logger logger)
Method Detail

setFile

public void setFile(java.io.File file)
Sets the zip file

Specified by:
setFile in interface PlexusIoArchivedResourceCollection

getFile

public java.io.File getFile()
Returns the zip file

Specified by:
getFile in interface PlexusIoArchivedResourceCollection

getEntries

protected abstract java.util.Iterator getEntries()
                                          throws java.io.IOException
Returns an iterator over the archives entries.

Throws:
java.io.IOException

getResources

public java.util.Iterator getResources()
                                throws java.io.IOException
Description copied from interface: PlexusIoResourceCollection
Returns an iterator over the resources in the collection.

Specified by:
getResources in interface PlexusIoResourceCollection
Throws:
java.io.IOException

getLastModified

public long getLastModified()
                     throws java.io.IOException
Description copied from interface: PlexusIoResourceCollection
Returns the collections last modification time. For a collection of files, this might be the last modification time of the file, which has been modified at last. For an archive file, this might be the modification time of the archive file.

Specified by:
getLastModified in interface PlexusIoResourceCollection
Overrides:
getLastModified in class AbstractPlexusIoResourceCollection
Returns:
PlexusIoResource.UNKNOWN_MODIFICATION_DATE, if the collections last modification time is unknown, otherwise the last modification time in milliseconds.
Throws:
java.io.IOException


Copyright © 2001-2009 Codehaus. All Rights Reserved.