Logo Search packages:      
Sourcecode: icedtea-web version File versions  Download package

net::sourceforge::jnlp::JNLPFile::JNLPFile ( URL  location,
Version  version,
boolean  strict,
UpdatePolicy  policy 
) throws IOException, ParseException [inline]

Create a JNLPFile from a URL and a version, checking for updates using the specified policy.

Parameters:
location the location of the JNLP file
version the version of the JNLP file
strict whether to enforce the spec when
policy the update policy
Exceptions:
IOException if an IO exception occurred
ParseException if the JNLP file was invalid

Definition at line 175 of file JNLPFile.java.

References fileLocation, openURL(), parse(), sourceLocation, and uniqueKey.

                                                                                                                           {
        Node root = Parser.getRootNode(openURL(location, version, policy));
        parse(root, strict, location);

        //Downloads the original jnlp file into the cache if possible
        //(i.e. If the jnlp file being launched exist locally, but it
        //originated from a website, then download the one from the website
        //into the cache).
        if (sourceLocation != null && location.getProtocol() == "file") {
            openURL(sourceLocation, version, policy);
        }

        this.fileLocation = location;

        this.uniqueKey = Calendar.getInstance().getTimeInMillis() + "-" +
                         Math.abs(((new java.util.Random()).nextInt())) + "-" +
                         location;

        if (JNLPRuntime.isDebug())
            System.err.println("UNIQUEKEY=" + this.uniqueKey);
    }


Generated by  Doxygen 1.6.0   Back to index