Class BuildArtifactImpl

    • Constructor Detail

    • Method Detail

      • getSize

        public long getSize()
        Description copied from interface: BuildArtifact
        Computes artifact size. This method is not recursive.
        Specified by:
        getSize in interface BuildArtifact
        Returns:
        artifact size for file or 0 otherwise
      • getTimestamp

        public long getTimestamp()
        Specified by:
        getTimestamp in interface BuildArtifact
        Returns:
        artifact last modification timestamp
      • isDirectory

        public boolean isDirectory()
        Specified by:
        isDirectory in interface BuildArtifact
        Returns:
        true if this artifact represents a directory
      • isArchive

        public boolean isArchive()
        Specified by:
        isArchive in interface BuildArtifact
        Returns:
        true if this artifact is archive file (.zip, .jar, .tar.gz, etc.)
      • isContainer

        public boolean isContainer()
        Specified by:
        isContainer in interface BuildArtifact
        Returns:
        true if this artifact is directory or (archive if used BuildArtifactsViewMode with isViewArchivesContent == true)
      • isFile

        public boolean isFile()
        Specified by:
        isFile in interface BuildArtifact
        Returns:
        true if this artifact is regular file (may be archive at the same time)
      • hasChildren

        public boolean hasChildren()
      • getChildren

        @NotNull
        public Collection<BuildArtifact> getChildren()
        Description copied from interface: BuildArtifact
        Returns sub items of the artifact. Sub items is child artifacts if artifacts is directory. Or returns archive root's child if used BuildArtifactsViewMode with isViewArchivesContent==true
        Specified by:
        getChildren in interface BuildArtifact
        Returns:
        see above
      • getInputStream

        @NotNull
        public InputStream getInputStream()
                                   throws IOException
        Description copied from interface: BuildArtifact
        Creates input stream for this artifact. Client must close the stream at end Exception will be thrown if artifact does not contains content
        Specified by:
        getInputStream in interface BuildArtifact
        Returns:
        file content or null
        Throws:
        IOException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object