public class PlexusIoProxyResourceCollection extends AbstractPlexusIoResourceCollectionWithAttributes implements EncodingSupported
PlexusIoResourceCollection
for an archives contents.identityTransformer
DEFAULT_ROLE_HINT, ROLE
Constructor and Description |
---|
PlexusIoProxyResourceCollection(PlexusIoResourceCollection src) |
Modifier and Type | Method and Description |
---|---|
protected FileSelector |
getDefaultFileSelector() |
long |
getLastModified()
Returns the collections last modification time.
|
String |
getName(PlexusIoResource resource)
Returns the resources suggested name.
|
Iterator<PlexusIoResource> |
getResources()
Returns an iterator over the resources in the collection.
|
PlexusIoResourceCollection |
getSrc()
Returns the archive to read.
|
boolean |
isConcurrentAccessSupported()
Indicates if this collection supports concurrent access to its resources.
|
void |
setDefaultAttributes(int uid,
String userName,
int gid,
String groupName,
int fileMode,
int dirMode) |
void |
setEncoding(Charset charset)
Supplies the encoding to be used for decoding filenames/paths
|
void |
setOverrideAttributes(int uid,
String userName,
int gid,
String groupName,
int fileMode,
int dirMode) |
void |
setStreamTransformer(InputStreamTransformer streamTransformer) |
Stream |
stream()
Returns the resources as a stream.
|
getDefaultDirAttributes, getDefaultFileAttributes, getOverrideDirAttributes, getOverrideFileAttributes, mergeAttributes, setDefaultDirAttributes, setDefaultFileAttributes, setOverrideDirAttributes, setOverrideFileAttributes
getExcludes, getFileMappers, getFileSelectors, getIncludes, getInputStream, getName, getPrefix, getStreamTransformer, isCaseSensitive, isIncludingEmptyDirectories, isSelected, isUsingDefaultExcludes, iterator, resolve, setCaseSensitive, setExcludes, setFileMappers, setFileSelectors, setIncludes, setIncludingEmptyDirectories, setPrefix, setUsingDefaultExcludes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public PlexusIoProxyResourceCollection(@Nonnull PlexusIoResourceCollection src)
public PlexusIoResourceCollection getSrc()
public void setDefaultAttributes(int uid, String userName, int gid, String groupName, int fileMode, int dirMode)
public void setOverrideAttributes(int uid, String userName, int gid, String groupName, int fileMode, int dirMode)
public void setStreamTransformer(InputStreamTransformer streamTransformer)
setStreamTransformer
in class AbstractPlexusIoResourceCollection
protected FileSelector getDefaultFileSelector()
public Stream stream()
PlexusIoResourceCollection
stream
in interface PlexusIoResourceCollection
public Iterator<PlexusIoResource> getResources() throws IOException
PlexusIoResourceCollection
getResources
in interface PlexusIoResourceCollection
IOException
- .public String getName(PlexusIoResource resource)
PlexusIoResourceCollection
getName
in interface PlexusIoResourceCollection
getName
in class AbstractPlexusIoResourceCollection
resource
- A resource, which has been obtained by
calling PlexusIoResourceCollection.getResources()
.public long getLastModified() throws IOException
PlexusIoResourceCollection
getLastModified
in interface PlexusIoResourceCollection
getLastModified
in class AbstractPlexusIoResourceCollection
PlexusIoResource.UNKNOWN_MODIFICATION_DATE
,
if the collections last modification time is unknown,
otherwise the last modification time in milliseconds.IOException
- .public void setEncoding(Charset charset)
EncodingSupported
setEncoding
in interface EncodingSupported
charset
- The charset to usepublic boolean isConcurrentAccessSupported()
PlexusIoResourceCollection
Some resource collections (like tar files) may not support efficient random access
or seek operation so implementations that represent such collections may not be able
to provide concurrent access to its resources. If implementation returns false
,
then it is not safe to access its methods and resources in concurrent fashion.
For example it is not safe to read from two resources in two concurrent threads,
to read a resource and iterate over the iterator returned by PlexusIoResourceCollection.getResources()
in two concurrent threads, etc.
Please note that this method indicates concurrent support only for the collection,
not for the individual resources. This means there is no guarantee that
the resources returned by PlexusIoResourceCollection.resolve(PlexusIoResource)
or the input stream
returned by PlexusIoResourceCollection.getInputStream(PlexusIoResource)
are thread-safe,
even if true
is returned.
isConcurrentAccessSupported
in interface PlexusIoResourceCollection
true
if this collection supports concurrent access,
otherwise false
Copyright © 2001–2022 Codehaus Plexus. All rights reserved.