public abstract class PlexusIoCompressedFileResourceCollection extends Object implements PlexusIoArchivedResourceCollection, Iterable<PlexusIoResource>
DEFAULT_ROLE_HINT, ROLE| Constructor and Description |
|---|
PlexusIoCompressedFileResourceCollection() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract PlexusIoResourceAttributes |
getAttributes(File f) |
protected abstract String |
getDefaultExtension() |
File |
getFile()
Returns the archive file
|
protected abstract InputStream |
getInputStream(File file) |
InputStream |
getInputStream(PlexusIoResource resource)
Returns an input stream for the provided resource, with stream transformers applied
|
long |
getLastModified()
Returns the collections last modification time.
|
protected String |
getName(File file) |
String |
getName(PlexusIoResource resource)
Returns the resources suggested name.
|
String |
getPath() |
Iterator<PlexusIoResource> |
getResources()
Returns an iterator over the resources in the collection.
|
Iterator<PlexusIoResource> |
iterator() |
PlexusIoResource |
resolve(PlexusIoResource resource)
Resolves the supplide resource into a "real" resource.
|
void |
setFile(File file)
Sets the arcihve file
|
void |
setPath(String path) |
void |
setStreamTransformer(InputStreamTransformer streamTransformers) |
Stream |
stream()
Returns the resources as a stream.
|
public PlexusIoCompressedFileResourceCollection()
public File getFile()
PlexusIoArchivedResourceCollectiongetFile in interface PlexusIoArchivedResourceCollectionpublic void setFile(File file)
PlexusIoArchivedResourceCollectionsetFile in interface PlexusIoArchivedResourceCollectionpublic String getPath()
public void setPath(String path)
protected abstract PlexusIoResourceAttributes getAttributes(File f) throws IOException
IOExceptionpublic void setStreamTransformer(InputStreamTransformer streamTransformers)
public Stream stream()
PlexusIoResourceCollectionstream in interface PlexusIoResourceCollectionpublic Iterator<PlexusIoResource> getResources() throws IOException
PlexusIoResourceCollectiongetResources in interface PlexusIoResourceCollectionIOException - .protected String getName(File file) throws IOException
IOExceptionprotected abstract String getDefaultExtension()
@Nonnull protected abstract InputStream getInputStream(File file) throws IOException
IOExceptionpublic InputStream getInputStream(PlexusIoResource resource) throws IOException
PlexusIoResourceCollectiongetInputStream in interface PlexusIoResourceCollectionresource - The resourcesIOException - when something goes badpublic PlexusIoResource resolve(PlexusIoResource resource) throws IOException
PlexusIoResourceCollectionresolve in interface PlexusIoResourceCollectionresource - The resourcesIOException - when something goes badpublic Iterator<PlexusIoResource> iterator()
iterator in interface Iterable<PlexusIoResource>public String getName(PlexusIoResource resource)
PlexusIoResourceCollectiongetName in interface PlexusIoResourceCollectionresource - A resource, which has been obtained by
calling PlexusIoResourceCollection.getResources().public long getLastModified()
throws IOException
PlexusIoResourceCollectiongetLastModified in interface PlexusIoResourceCollectionPlexusIoResource.UNKNOWN_MODIFICATION_DATE,
if the collections last modification time is unknown,
otherwise the last modification time in milliseconds.IOException - .Copyright © 2001-2015 Codehaus. All Rights Reserved.