Class JarDescriptor

java.lang.Object
rs.baselib.lang.JarDescriptor

public class JarDescriptor
extends java.lang.Object
Describes a JAR file
Author:
ralph
  • Constructor Summary

    Constructors 
    Constructor Description
    JarDescriptor​(java.io.File file)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    void close()
    Closes the file.
    java.io.File getFile()
    Returns the file.
    java.util.jar.JarFile getJarFile()
    Returns the jarFile.
    java.util.jar.Manifest getManifest()
    Returns the manifest.
    java.lang.String getUrlPrefix()
    Returns the URL prefix for the JAR.
    protected void setFile​(java.io.File file)
    Sets the file.
    protected void setJarFile​(java.util.jar.JarFile jarFile)
    Sets the jarFile.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JarDescriptor

      public JarDescriptor​(java.io.File file) throws java.io.IOException
      Constructor.
      Parameters:
      file - the jar file
      Throws:
      java.io.IOException - when Jar cannot be opened
  • Method Details

    • getJarFile

      public java.util.jar.JarFile getJarFile()
      Returns the jarFile.
      Returns:
      the jarFile
    • setJarFile

      protected void setJarFile​(java.util.jar.JarFile jarFile)
      Sets the jarFile.
      Parameters:
      jarFile - the jarFile to set
    • getFile

      public java.io.File getFile()
      Returns the file.
      Returns:
      the file
    • setFile

      protected void setFile​(java.io.File file)
      Sets the file.
      Parameters:
      file - the file to set
    • getManifest

      public java.util.jar.Manifest getManifest() throws java.io.IOException
      Returns the manifest.
      Returns:
      the manifest.
      Throws:
      java.io.IOException - when Manifest file cannot be opened
    • close

      public void close() throws java.io.IOException
      Closes the file.
      Throws:
      java.io.IOException - when file cannot be closed
    • getUrlPrefix

      public java.lang.String getUrlPrefix() throws java.io.IOException
      Returns the URL prefix for the JAR.
      Returns:
      URL prefix
      Throws:
      java.io.IOException - when file cannot be read