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 org.codehaus.plexus.components.io.resources.AbstractPlexusIoResourceCollection
identityTransformer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Iterator
<PlexusIoResource> Returns an iterator over the archives entries.getFile()
Returns the zip filelong
Returns the collections last modification time.Returns an iterator over the resources in the collection.void
Sets the zip filestream()
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
-
Constructor Details
-
AbstractPlexusIoArchiveResourceCollection
protected AbstractPlexusIoArchiveResourceCollection()
-
-
Method Details
-
setFile
Sets the zip file- Specified by:
setFile
in interfacePlexusIoArchivedResourceCollection
-
getFile
Returns the zip file- Specified by:
getFile
in 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:PlexusIoResourceCollection
Returns an iterator over the resources in the collection.- Specified by:
getResources
in interfacePlexusIoResourceCollection
- Returns:
- An iterator
- Throws:
IOException
- .
-
stream
Description copied from interface:PlexusIoResourceCollection
Returns the resources as a stream.- Specified by:
stream
in interfacePlexusIoResourceCollection
- Returns:
- A stream for functional iteration
-
getLastModified
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
- .
-