Class AbstractPlexusIoArchiveResourceCollection
- java.lang.Object
-
- org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
-
- org.codehaus.plexus.components.io.resources.AbstractPlexusIoArchiveResourceCollection
-
- All Implemented Interfaces:
java.lang.Iterable<PlexusIoResource>
,PlexusIoArchivedResourceCollection
,PlexusIoResourceCollection
public abstract class AbstractPlexusIoArchiveResourceCollection extends AbstractPlexusIoResourceCollection implements PlexusIoArchivedResourceCollection
Default implementation ofPlexusIoFileResourceCollection
for zip files, tar files, etc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
AbstractPlexusIoArchiveResourceCollection.FilteringIterator
-
Nested classes/interfaces inherited from class org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
AbstractPlexusIoResourceCollection.IdentityTransformer
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
file
-
Fields inherited from class org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
identityTransformer
-
Fields inherited from interface org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection
DEFAULT_ROLE_HINT, ROLE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPlexusIoArchiveResourceCollection()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.util.Iterator<PlexusIoResource>
getEntries()
Returns an iterator over the archives entries.java.io.File
getFile()
Returns the zip filelong
getLastModified()
Returns the collections last modification time.java.util.Iterator<PlexusIoResource>
getResources()
Returns an iterator over the resources in the collection.void
setFile(java.io.File file)
Sets the zip fileStream
stream()
Returns the resources as a stream.-
Methods inherited from class org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
getExcludes, getFileMappers, getFileSelectors, getIncludes, getInputStream, getName, getName, getPrefix, getStreamTransformer, isCaseSensitive, isIncludingEmptyDirectories, isSelected, isUsingDefaultExcludes, iterator, resolve, setCaseSensitive, setExcludes, setFileMappers, setFileSelectors, setIncludes, setIncludingEmptyDirectories, setPrefix, setStreamTransformer, 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
getInputStream, getName, isConcurrentAccessSupported, resolve
-
-
-
-
Method Detail
-
setFile
public void setFile(java.io.File file)
Sets the zip file- Specified by:
setFile
in interfacePlexusIoArchivedResourceCollection
-
getFile
public java.io.File getFile()
Returns the zip file- Specified by:
getFile
in interfacePlexusIoArchivedResourceCollection
-
getEntries
protected abstract java.util.Iterator<PlexusIoResource> getEntries() throws java.io.IOException
Returns an iterator over the archives entries.- Returns:
- An iterator, may be java.io.Closeable
- Throws:
java.io.IOException
- an IOException, doh
-
getResources
public java.util.Iterator<PlexusIoResource> getResources() throws java.io.IOException
Description copied from interface:PlexusIoResourceCollection
Returns an iterator over the resources in the collection.- Specified by:
getResources
in interfacePlexusIoResourceCollection
- Returns:
- An iterator
- Throws:
java.io.IOException
- .
-
stream
public Stream stream()
Description copied from interface:PlexusIoResourceCollection
Returns the resources as a stream.- Specified by:
stream
in interfacePlexusIoResourceCollection
- Returns:
- A stream for functional iteration
-
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 interfacePlexusIoResourceCollection
- Overrides:
getLastModified
in classAbstractPlexusIoResourceCollection
- Returns:
PlexusIoResource.UNKNOWN_MODIFICATION_DATE
, if the collections last modification time is unknown, otherwise the last modification time in milliseconds.- Throws:
java.io.IOException
- .
-
-