|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.gui.JNLPUtilities
public class JNLPUtilities
This class contains utilities for use with JNLP, aka Web Start.
For more information about Web Start, see
http://java.sun.com/products/javawebstart
or $PTII/doc/webStartHelp
Configuration
Red (cxh) |
Red (cxh) |
Constructor Summary | |
---|---|
private |
JNLPUtilities()
Instances of this class cannot be created. |
Method Summary | |
---|---|
private static java.net.URL |
_lookupJarURL(java.lang.String jarURLName)
|
static java.net.URL |
canonicalizeJarURL(java.net.URL possibleJarURL)
Canonicalize a jar URL. |
static boolean |
isRunningUnderWebStart()
Return true if we are running under WebStart. |
static java.net.URL |
jarURLEntryResource(java.lang.String spec)
Deprecated. Use ptolemy.util.ClassUtilities#jarURLEntryResource(String) |
static java.lang.String |
saveJarURLAsTempFile(java.lang.String jarURLName,
java.lang.String prefix,
java.lang.String suffix,
java.io.File directory)
Given a jar URL, read in the resource and save it as a file. |
static java.lang.String |
saveJarURLInClassPath(java.lang.String jarURLName)
Given a jar URL, read in the resource and save it as a file in a similar directory in the classpath if possible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private JNLPUtilities()
Method Detail |
---|
public static java.net.URL canonicalizeJarURL(java.net.URL possibleJarURL) throws java.net.MalformedURLException
possibleJarURL
- A URL that may or may not be a jar URL
java.net.MalformedURLException
- If new URL() throws it.public static boolean isRunningUnderWebStart()
public static java.net.URL jarURLEntryResource(java.lang.String spec) throws java.io.IOException
!/
, then return
null. Web Start uses jar URL, and there are some cases where
if we have a jar URL, then we may need to strip off the
jar:url!/
part so that we can search for
the {entry} as a resource.
spec
- The string containing the jar url.
java.io.IOException
- If it cannot convert the specification to
a URL.ClassUtilities.jarURLEntryResource(String)
,
JarURLConnection
public static java.lang.String saveJarURLAsTempFile(java.lang.String jarURLName, java.lang.String prefix, java.lang.String suffix, java.io.File directory) throws java.io.IOException
jarURLName
- The name of the jar URL to read. jar URLS start
with "jar:" and have a "!/" in them.prefix
- The prefix used to generate the name, it must be
at least three characters long.suffix
- The suffix to use to generate the name. If the
suffix is null, then the suffix of the jarURLName is used. If
the jarURLName does not contain a ".", then ".tmp" will be useddirectory
- The directory where the temporary file is
created. If directory is null then the platform dependent
temporary directory is used.
java.io.IOException
- If there is a problem saving the jar URL.File.createTempFile(java.lang.String, java.lang.String, java.io.File)
public static java.lang.String saveJarURLInClassPath(java.lang.String jarURLName) throws java.io.IOException
jarURLName
- The name of the jar URL to read. jar URLS start
with "jar:" and have a "!/" in them.
java.io.IOException
- If there is a problem saving the jar URL.private static java.net.URL _lookupJarURL(java.lang.String jarURLName) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |