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 of
PlexusIoFileResourceCollection for
zip files, tar files, etc.- Author:
- jwi
-
Field Summary
Fields inherited from class AbstractPlexusIoResourceCollection
identityTransformer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Iterator<PlexusIoResource> Returns an iterator over the archives entries.getFile()Returns the zip filelongReturns the collections last modification time.Returns an iterator over the resources in the collection.voidSets the zip filestream()Returns the resources as a stream.Methods inherited from class AbstractPlexusIoResourceCollection
getExcludes, getFileMappers, getFileSelectors, getIncludes, getInputStream, getName, getName, getPrefix, getStreamTransformer, isCaseSensitive, isIncludingEmptyDirectories, isSelected, isUsingDefaultExcludes, iterator, resolve, setCaseSensitive, setExcludes, setFileMappers, setFileSelectors, setIncludes, setIncludingEmptyDirectories, setPrefix, setStreamTransformer, setUsingDefaultExcludesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface PlexusIoResourceCollection
getInputStream, getName, isConcurrentAccessSupported, resolve
-
Constructor Details
-
AbstractPlexusIoArchiveResourceCollection
protected AbstractPlexusIoArchiveResourceCollection()
-
-
Method Details
-
setFile
Sets the zip file- Specified by:
setFilein interfacePlexusIoArchivedResourceCollection
-
getFile
Returns the zip file- Specified by:
getFilein interfacePlexusIoArchivedResourceCollection
-
getEntries
Returns an iterator over the archives entries.- Returns:
- An iterator, may be java.io.Closeable
- Throws:
IOException- an IOException, doh
-
getResources
Description copied from interface:PlexusIoResourceCollectionReturns an iterator over the resources in the collection.- Specified by:
getResourcesin interfacePlexusIoResourceCollection- Returns:
- An iterator
- Throws:
IOException- .
-
stream
Description copied from interface:PlexusIoResourceCollectionReturns the resources as a stream.- Specified by:
streamin interfacePlexusIoResourceCollection- Returns:
- A stream for functional iteration
-
getLastModified
Description 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- .
-