Package java.util

Examples of java.util.Properties.store()


            Properties properties = new Properties();
            properties.put("server-address", server_address);
            properties.put("server-port", String.valueOf(server_port));       
            properties.put("default-address", String.valueOf(default_address));
       
            properties.store(new FileOutputStream(main.SERVER_CONFIG_FILE),
                "jrdesktop server configuration file");
        } catch (Exception e) {
            e.getStackTrace();
        }           
    }   
View Full Code Here


       
        Properties prop = new Properties();
        prop.setProperty( "name",
                          this.ruleSetValidFileName );       
        ByteArrayOutputStream propStream = new ByteArrayOutputStream();
        prop.store(propStream, null);                         
        jarer.addByteArray(propStream.toByteArray(), "rule-set.conf");

        jarer.close();
        return output.toByteArray();
    }
View Full Code Here

                    ".dic.compiled");
              }
            }).getCheckSum());
    compiledProperties.setProperty("paoding.analysis.compiler.class", this.getClass().getName());
    compiledProperties.setProperty("paoding.analysis.compiler.version", VERSION);
    compiledProperties.store(compiledPropertiesOutput, "dont edit it! this file was auto generated by paoding.");
    compiledPropertiesOutput.close();
    compliedMetadataFile.setReadOnly();
  }

View Full Code Here

                    ".dic.compiled");
              }
            }).getCheckSum());
    compiledProperties.setProperty("paoding.analysis.compiler.class", this.getClass().getName());
    compiledProperties.setProperty("paoding.analysis.compiler.version", VERSION);
    compiledProperties.store(compiledPropertiesOutput, "dont edit it! this file was auto generated by paoding.");
    compiledPropertiesOutput.close();
    compliedMetadataFile.setReadOnly();
  }

 
View Full Code Here

        // Save the user configuration if they changed.
        if( userConfModified ) {
            try {
                FileOutputStream out = new FileOutputStream( userConfigurationFile );
                //properties.store( out, "Java Email Server (JES) User Configuration");
                properties.store( out, USER_PROPERTIES_HEADER );
                log.info( "Changes to user.conf persisted to disk." );
            }
            catch (IOException e) {
                log.error( "Unable to store changes to user.conf!  Plain text passwords were not hashed!" );
            }
View Full Code Here

        Properties prop = new Properties();
        FileOutputStream out = null;
        try
        {
            out = new FileOutputStream(fileName);
            prop.store(out, COMMENT);
        }
        catch (IOException ex)
        {
        }
        finally
View Full Code Here

        Properties prop = new Properties();
        FileOutputStream out = null;
        try
        {
            out = new FileOutputStream(fileName);
            prop.store(out, getComment());
        }
        catch (IOException ex)
        {
        }
        finally
View Full Code Here

        FileOutputStream out = null;
        try
        {
            out = new FileOutputStream(fileName);
            prop.store(out, getComment());
        }
        catch (IOException ex)
        {
        }
        finally
View Full Code Here

        File pomPropertiesFile = new File( pomPropertiesDir, "pom.properties" );

        OutputStream os = new FileOutputStream( pomPropertiesFile );

        p.store( os, "Generated by Maven" );

        os.close(); // stream is flushed but not closed by Properties.store()

        FileUtils.copyFile( pomFile, new File( pomPropertiesDir, "pom.xml" ) );
View Full Code Here

            saveSet(props, "repositories.", repositories.keySet());
            saveMap(props, "features.", installed);
            props.put("bootFeaturesInstalled", Boolean.toString(bootFeaturesInstalled));
            OutputStream os = new FileOutputStream(file);
            try {
                props.store(new FileOutputStream(file), "FeaturesService State");
            } finally {
                os.close();
            }
        } catch (Exception e) {
            LOGGER.error("Error persisting FeaturesService state", e);
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.