Package org.foray.render.awt.viewer

Examples of org.foray.render.awt.viewer.SecureResourceBundle


            /* if the given resource file not found, the english resource uses
             * as default */
            modifiedPath = path.substring(0, path.lastIndexOf(".")) + ".en";
            url = getClass().getResource(modifiedPath);
        }
        return new SecureResourceBundle(url.openStream());
    }
View Full Code Here


     * @param path The path to the bundle.
     * @return The secure resource bundle.
     * @throws IOException For errors finding or reading the passed URL.
     */
    private SecureResourceBundle getResourceBundle(final String path) throws IOException {
        SecureResourceBundle bundle = null;

        URL url = getClass().getResource(path);

        /* The following code was added by Alex Alishevskikh
         * [alex@openmechanics.net] to fix for crashes on machines with
         * unsupported user languages */
        String modifiedPath = path;
        if (url == null) {
            /* if the given resource file not found, the english resource
             * uses as default */
            modifiedPath = path.substring(0, path.lastIndexOf(".")) + ".en";
            url = getClass().getResource(modifiedPath);
        }
        final InputStream in = url.openStream();
        bundle = new SecureResourceBundle(in);
        return bundle;
    }
View Full Code Here

TOP

Related Classes of org.foray.render.awt.viewer.SecureResourceBundle

Copyright © 2018 www.massapicom. 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.