Examples of FileContents


Examples of javax.jnlp.FileContents

     * @throws IOException  if there was a problem reading the muffin.
     */
    private FileContents getOrCreateFile(final PersistenceService ps, final URL address) throws IOException
    {
        ui.debug("Muffin lookup"); //$NON-NLS-1$
        FileContents toRet = null;
        try
        {
            toRet = ps.get(address);

            // See if the stream exists:
            InputStream in = toRet.getInputStream();
            in.close();
        }
        catch (FileNotFoundException fnf)
        {
            ui.debug("Creating muffins"); //$NON-NLS-1$
View Full Code Here

Examples of javax.jnlp.FileContents

        // We store a properties file in the "configuration" address.
        try
        {
            URL config = new URL(bs.getCodeBase(), "configuration"); //$NON-NLS-1$
            FileContents contents = getOrCreateFile(ps, config);
            if (contents == null)
            {
                return;
            }

            // Open for output (true means "overwrite").
            PrintStream out = new PrintStream(contents.getOutputStream(true));
            if (destination != null)
            {
                out.println(DESTINATION_KEY + "=" + destination.toExternalForm()); //$NON-NLS-1$
            }
            out.println(PORT_KEY + "=" + localPort); //$NON-NLS-1$
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.