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 ofPlexusIoFileResourceCollectionfor 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 protectedAbstractPlexusIoArchiveResourceCollection()
-
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.FilegetFile()Returns the zip filelonggetLastModified()Returns the collections last modification time.Iterator<PlexusIoResource>getResources()Returns an iterator over the resources in the collection.voidsetFile(File file)Sets the zip fileStreamstream()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:
setFilein interfacePlexusIoArchivedResourceCollection
-
getFile
public File getFile()
Returns the zip file- Specified by:
getFilein 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:PlexusIoResourceCollectionReturns an iterator over the resources in the collection.- Specified by:
getResourcesin interfacePlexusIoResourceCollection- Returns:
- An iterator
- Throws:
IOException- .
-
stream
public Stream stream()
Description copied from interface:PlexusIoResourceCollectionReturns the resources as a stream.- Specified by:
streamin interfacePlexusIoResourceCollection- Returns:
- A stream for functional iteration
-
getLastModified
public long getLastModified() throws IOExceptionDescription copied from interface:PlexusIoResourceCollectionReturns 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:
getLastModifiedin interfacePlexusIoResourceCollection- Overrides:
getLastModifiedin classAbstractPlexusIoResourceCollection- Returns:
PlexusIoResource.UNKNOWN_MODIFICATION_DATE, if the collections last modification time is unknown, otherwise the last modification time in milliseconds.- Throws:
IOException- .
-
-