Package org.apache.commons.collections

Examples of org.apache.commons.collections.ExtendedProperties.load()


            {
                // resolve relative path from basedir and leave
                // absolute path untouched.
                File fullPath = project.resolveFile(sources[i]);
                log("Using contextProperties file: " + fullPath);
                source.load(new FileInputStream(fullPath));
            }
            catch (Exception e)
            {
                ClassLoader classLoader = this.getClass().getClassLoader();
           
View Full Code Here


                        throw new BuildException("Context properties file " + sources[i] +
                            " could not be found in the file system or on the classpath!");
                    }
                    else
                    {
                        source.load(inputStream);
                    }
                }
                catch (IOException ioe)
                {
                    source = null;
View Full Code Here

            {
                // resolve relative path from basedir and leave
                // absolute path untouched.
                File fullPath = project.resolveFile(sources[i]);
                log("Using contextProperties file: " + fullPath);
                source.load(new FileInputStream(fullPath));
            }
            catch (IOException e)
            {
                ClassLoader classLoader = this.getClass().getClassLoader();
View Full Code Here

                        throw new BuildException("Context properties file " + sources[i] +
                            " could not be found in the file system or on the classpath!");
                    }
                    else
                    {
                        source.load(inputStream);
                    }
                }
                catch (IOException ioe)
                {
                    source = null;
View Full Code Here

                File prefsFile = new File(preferencesDirectory(), PREFERENCES_NAME_OLD);
                if (prefsFile.exists()) {
                    ExtendedProperties ep = new ExtendedProperties();
                    try {
                        ep.load(new FileInputStream(prefsFile));

                        Preferences prefEditor = Preferences.userRoot().node(
                                CAYENNE_PREFERENCES_PATH).node(EDITOR);

                        prefEditor.putBoolean(
View Full Code Here

        {
            inputStream = getClass()
                    .getResourceAsStream(DEFAULT_TOOLS_PROPERTIES);
            if (inputStream != null)
            {
                defaultProperties.load(inputStream);
            }
        }
        catch (IOException ioe)
        {
            log("Cannot load default extendedProperties!", ioe);
View Full Code Here

        ExtendedProperties p = new ExtendedProperties();
        InputStream is = getServletContext().getResourceAsStream(propsFile);
        if (is != null)
        {
            // load the properties from the input stream
            p.load(is);
            velocity.info("VelocityViewServlet: Using custom properties at '"
                          + propsFile + "'");
        }
        else
        {
View Full Code Here

            try
            {
                // resolve relative path from basedir and leave
                // absolute path untouched.
                File fullPath = project.resolveFile(sources[i]);
                source.load(new FileInputStream(fullPath));
            }
            catch (Exception e)
            {
                ClassLoader classLoader = this.getClass().getClassLoader();
           
View Full Code Here

                        throw new BuildException("Context properties file " + sources[i] +
                            " could not be found in the file system or on the classpath!");
                    }
                    else
                    {
                        source.load(inputStream);
                    }
                }
                catch (IOException ioe)
                {
                    source = null;
View Full Code Here

        }
       
        ExtendedProperties p = new ExtendedProperties();
        if (propsFile != null)
        {
            p.load(servletContext.getResourceAsStream(propsFile));

            Velocity.info("VelocityViewServlet: Custom Properties File: "+propsFile);
        }
        else
        {
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.