Package rs.baselib.lang
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 voidclose()Closes the file.java.io.FilegetFile()Returns the file.java.util.jar.JarFilegetJarFile()Returns the jarFile.java.util.jar.ManifestgetManifest()Returns the manifest.java.lang.StringgetUrlPrefix()Returns the URL prefix for the JAR.protected voidsetFile(java.io.File file)Sets the file.protected voidsetJarFile(java.util.jar.JarFile jarFile)Sets the jarFile.
-
Constructor Details
-
JarDescriptor
public JarDescriptor(java.io.File file) throws java.io.IOExceptionConstructor.- 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.IOExceptionReturns the manifest.- Returns:
- the manifest.
- Throws:
java.io.IOException- when Manifest file cannot be opened
-
close
public void close() throws java.io.IOExceptionCloses the file.- Throws:
java.io.IOException- when file cannot be closed
-
getUrlPrefix
public java.lang.String getUrlPrefix() throws java.io.IOExceptionReturns the URL prefix for the JAR.- Returns:
- URL prefix
- Throws:
java.io.IOException- when file cannot be read
-