Class JarDescriptor

java.lang.Object
com.atlassian.bamboo.agent.classserver.JarDescriptor

@Internal public class JarDescriptor extends Object
Provides information about a single Jar
Since:
3.3
  • Constructor Details

    • JarDescriptor

      public JarDescriptor(String name, ByteSource inputSupplier)
    • JarDescriptor

      public JarDescriptor(@NotNull @NotNull File file, ByteSource inputSupplier)
    • JarDescriptor

      public JarDescriptor(@Nullable @Nullable File file, String name, ByteSource inputSupplier)
  • Method Details

    • getName

      @NotNull public @NotNull String getName()
      Returns:
      name of the Jar file
    • getChecksum

      public long getChecksum()
      Returns:
      the Adler32 checksum of the Jar file
    • getInputStream

      @NotNull public @NotNull InputStream getInputStream() throws IOException
      Returns:
      inputStream of the jar file contents. Needs to be closed.
      Throws:
      IOException - if a stream to the jar file could not be created
    • getFileHashDescriptor

      @NotNull public @NotNull FileHashDescriptor getFileHashDescriptor()
      Returns:
      fileHashDescriptor for the JarDescriptor
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLength

      public Optional<Long> getLength()
    • getLastModified

      public Optional<Long> getLastModified()