Class AbstractPlexusIoArchiveResourceCollection
- java.lang.Object
-
- org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
-
- org.codehaus.plexus.components.io.resources.AbstractPlexusIoArchiveResourceCollection
-
- All Implemented Interfaces:
Iterable<PlexusIoResource>
,PlexusIoArchivedResourceCollection
,PlexusIoResourceCollection
public abstract class AbstractPlexusIoArchiveResourceCollection extends AbstractPlexusIoResourceCollection implements PlexusIoArchivedResourceCollection
Default implementation ofPlexusIoFileResourceCollection
for zip files, tar files, etc.- Author:
- jwi
-
-
Field Summary
-
Fields inherited from class org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
identityTransformer
-
-
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 Iterator<PlexusIoResource>
getEntries()
Returns an iterator over the archives entries.File
getFile()
Returns the zip filelong
getLastModified()
Returns the collections last modification time.Iterator<PlexusIoResource>
getResources()
Returns an iterator over the resources in the collection.void
setFile(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 java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection
getInputStream, getName, isConcurrentAccessSupported, resolve
-
-
-
-
Method Detail
-
setFile
public void setFile(File file)
Sets the zip file- Specified by:
setFile
in interfacePlexusIoArchivedResourceCollection
-
getFile
public File getFile()
Returns the zip file- Specified by:
getFile
in interfacePlexusIoArchivedResourceCollection
-
getEntries
protected abstract Iterator<PlexusIoResource> getEntries() throws IOException
Returns an iterator over the archives entries.- Returns:
- An iterator, may be java.io.Closeable
- Throws:
IOException
- an IOException, doh
-
getResources
public Iterator<PlexusIoResource> getResources() throws IOException
Description copied from interface:PlexusIoResourceCollection
Returns an iterator over the resources in the collection.- Specified by:
getResources
in interfacePlexusIoResourceCollection
- Returns:
- An iterator
- Throws:
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 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:
IOException
- .
-
-