Class ArchiveEntry


  • public class ArchiveEntry
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DIRECTORY  
      static int FILE  
      static java.lang.String ROLE  
      static int SYMLINK  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static ArchiveEntry createDirectoryEntry​(java.lang.String target, java.io.File file, int permissions, int defaultDirMode1)  
      static ArchiveEntry createDirectoryEntry​(java.lang.String target, org.codehaus.plexus.components.io.resources.PlexusIoResource resource, int permissions, int defaultDirectoryPermissions)  
      static ArchiveEntry createFileEntry​(java.lang.String target, java.io.File file, int permissions, int defaultDirectoryPermissions)  
      static ArchiveEntry createFileEntry​(java.lang.String target, org.codehaus.plexus.components.io.resources.PlexusIoResource resource, int permissions, org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection collection, int defaultDirectoryPermissions)  
      static ArchiveEntry createSymlinkEntry​(java.lang.String symlinkName, int permissions, java.lang.String symlinkDestination, int defaultDirectoryPermissions)  
      int getDefaultDirMode()  
      java.io.File getFile()
      Deprecated.
      As of 1.0-alpha-10, file entries are no longer backed by files, but by instances of PlexusIoResource.
      java.io.InputStream getInputStream()  
      int getMode()  
      java.lang.String getName()  
      org.codehaus.plexus.components.io.resources.PlexusIoResource getResource()  
      org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes getResourceAttributes()  
      int getType()  
      void setResourceAttributes​(org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes attributes)  
      boolean shouldAddSynchronously()
      Indicates if this entry should be added to the archive synchronously before adding the next entry and/or accessing the next entry of ResourceIterator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns:
        the filename of this entry in the archive.
      • getFile

        @Deprecated
        public java.io.File getFile()
        Deprecated.
        As of 1.0-alpha-10, file entries are no longer backed by files, but by instances of PlexusIoResource. Consequently, you should use getInputStream()-
        Returns:
        The original file that will be stored in the archive.
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Returns:
        The resource contents.
        Throws:
        java.io.IOException
      • getType

        public int getType()
        Returns:
        FILE or DIRECTORY
      • getMode

        public int getMode()
        Returns:
        octal user/group/other unix like permissions.
      • shouldAddSynchronously

        public boolean shouldAddSynchronously()
        Indicates if this entry should be added to the archive synchronously before adding the next entry and/or accessing the next entry of ResourceIterator.
        Returns:
        true if this entry should be added synchronously
      • createFileEntry

        public static ArchiveEntry createFileEntry​(java.lang.String target,
                                                   org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
                                                   int permissions,
                                                   org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection collection,
                                                   int defaultDirectoryPermissions)
                                            throws ArchiverException
        Throws:
        ArchiverException
      • createFileEntry

        public static ArchiveEntry createFileEntry​(java.lang.String target,
                                                   java.io.File file,
                                                   int permissions,
                                                   int defaultDirectoryPermissions)
                                            throws ArchiverException,
                                                   java.io.IOException
        Throws:
        ArchiverException
        java.io.IOException
      • createDirectoryEntry

        public static ArchiveEntry createDirectoryEntry​(java.lang.String target,
                                                        @Nonnull
                                                        org.codehaus.plexus.components.io.resources.PlexusIoResource resource,
                                                        int permissions,
                                                        int defaultDirectoryPermissions)
                                                 throws ArchiverException
        Throws:
        ArchiverException
      • createDirectoryEntry

        public static ArchiveEntry createDirectoryEntry​(java.lang.String target,
                                                        java.io.File file,
                                                        int permissions,
                                                        int defaultDirMode1)
                                                 throws ArchiverException,
                                                        java.io.IOException
        Throws:
        ArchiverException
        java.io.IOException
      • createSymlinkEntry

        public static ArchiveEntry createSymlinkEntry​(java.lang.String symlinkName,
                                                      int permissions,
                                                      java.lang.String symlinkDestination,
                                                      int defaultDirectoryPermissions)
      • getResourceAttributes

        public org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes getResourceAttributes()
      • setResourceAttributes

        public void setResourceAttributes​(org.codehaus.plexus.components.io.attributes.PlexusIoResourceAttributes attributes)
      • getResource

        @Nonnull
        public org.codehaus.plexus.components.io.resources.PlexusIoResource getResource()
      • getDefaultDirMode

        public int getDefaultDirMode()