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) |
public PlexusIoCompressedFileResourceCollection()
public File getFile()
PlexusIoArchivedResourceCollection
getFile
in interface PlexusIoArchivedResourceCollection
public void setFile(File file)
PlexusIoArchivedResourceCollection
setFile
in interface PlexusIoArchivedResourceCollection
public String getPath()
public void setPath(String path)
protected abstract PlexusIoResourceAttributes getAttributes(File f) throws IOException
IOException
public void setStreamTransformer(InputStreamTransformer streamTransformers)
public Iterator<PlexusIoResource> getResources() throws IOException
PlexusIoResourceCollection
getResources
in interface PlexusIoResourceCollection
IOException
- .protected String getName(File file) throws IOException
IOException
protected abstract String getDefaultExtension()
@Nonnull protected abstract InputStream getInputStream(File file) throws IOException
IOException
public InputStream getInputStream(PlexusIoResource resource) throws IOException
PlexusIoResourceCollection
getInputStream
in interface PlexusIoResourceCollection
resource
- The resourcesIOException
- when something goes badpublic PlexusIoResource resolve(PlexusIoResource resource) throws IOException
PlexusIoResourceCollection
resolve
in interface PlexusIoResourceCollection
resource
- The resourcesIOException
- when something goes badpublic Iterator<PlexusIoResource> iterator()
iterator
in interface Iterable<PlexusIoResource>
public String getName(PlexusIoResource resource)
PlexusIoResourceCollection
getName
in interface PlexusIoResourceCollection
resource
- A resource, which has been obtained by
calling PlexusIoResourceCollection.getResources()
.public long getLastModified() throws IOException
PlexusIoResourceCollection
getLastModified
in interface PlexusIoResourceCollection
PlexusIoResource.UNKNOWN_MODIFICATION_DATE
,
if the collections last modification time is unknown,
otherwise the last modification time in milliseconds.IOException
- .Copyright © 2001-2014 Codehaus. All Rights Reserved.