Class PlexusIoCompressedFileResourceCollection

    • Field Detail

      • file

        private java.io.File file
      • path

        private java.lang.String path
    • Constructor Detail

      • PlexusIoCompressedFileResourceCollection

        public PlexusIoCompressedFileResourceCollection()
    • Method Detail

      • getPath

        public java.lang.String getPath()
      • setPath

        public void setPath​(java.lang.String path)
      • getAttributes

        protected abstract PlexusIoResourceAttributes getAttributes​(java.io.File f)
                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • getName

        protected java.lang.String getName​(java.io.File file)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • getDefaultExtension

        protected abstract java.lang.String getDefaultExtension()
      • getInputStream

        @Nonnull
        protected abstract java.io.InputStream getInputStream​(java.io.File file)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getInputStream

        public java.io.InputStream getInputStream​(PlexusIoResource resource)
                                           throws java.io.IOException
        Description copied from interface: PlexusIoResourceCollection
        Returns an input stream for the provided resource, with stream transformers applied
        Specified by:
        getInputStream in interface PlexusIoResourceCollection
        Parameters:
        resource - The resources
        Returns:
        A possibly transformed resource
        Throws:
        java.io.IOException - when something goes bad
      • resolve

        public PlexusIoResource resolve​(PlexusIoResource resource)
                                 throws java.io.IOException
        Description copied from interface: PlexusIoResourceCollection
        Resolves the supplied resource into a "real" resource. Resolving means applying input transformations Returns an input stream for the provided resource, with stream transformers applied
        Specified by:
        resolve in interface PlexusIoResourceCollection
        Parameters:
        resource - The resources
        Returns:
        A possibly transformed resource
        Throws:
        java.io.IOException - when something goes bad
      • getLastModified

        public long getLastModified()
                             throws java.io.IOException
        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 interface PlexusIoResourceCollection
        Returns:
        PlexusIoResource.UNKNOWN_MODIFICATION_DATE, if the collections last modification time is unknown, otherwise the last modification time in milliseconds.
        Throws:
        java.io.IOException - .
      • isConcurrentAccessSupported

        public boolean isConcurrentAccessSupported()
        Description copied from interface: PlexusIoResourceCollection
        Indicates if this collection supports concurrent access to its resources.

        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.

        Specified by:
        isConcurrentAccessSupported in interface PlexusIoResourceCollection
        Returns:
        true if this collection supports concurrent access, otherwise false