Package java.util

Examples of java.util.Properties.store()


        props.put("sling.resource.path", r == null ? "" : r.getPath());
        props.put("sling.resource.type", r == null ? "" : r.getResourceType());
        props.put("http.request.method", request.getMethod());

        setCustomProperties(props);
        props.store(response.getOutputStream(), "Data created by "
            + getClass().getName() + " at " + new Date());
        response.getOutputStream().flush();
    }

    /** Hook for additional custom properties */
 
View Full Code Here


            // save the BND generated bundle to the same output directory that maven uses
            bndProperties.setProperty( "-output", "${maven.build.dir}/${maven.build.finalName}.jar" );

            OutputStream out = new FileOutputStream( baseDir + BUILD_BND );
            bndProperties.store( out, " Merged BND Instructions" );
            IOUtil.close( out );

            // modify build template
            String buildXml = IOUtil.toString( getClass().getResourceAsStream( BUILD_XML ) );
            buildXml = StringUtils.replace( buildXml, "BND_VERSION", builder.getVersion() );
View Full Code Here

                    if ( metatypeProps.size() > 0 ) {
                        final int lastDot = useFile.getName().lastIndexOf(".");
                        final String baseName = useFile.getName().substring(0, lastDot);
                        final File propsFile = new File(useFile.getParentFile(), baseName + ".properties");
                        try {
                            metatypeProps.store(new FileWriter(propsFile), null);
                        } catch (IOException e) {
                            throw new SCRDescriptorException("Unable to get metatype.properties", propsFile.getAbsolutePath());
                        }
                        fileNames.add(parentDir.getName() + '/' + mtDir.getName() + '/' + propsFile.getName());
                        metatypeLocation = MetaTypeService.METATYPE_DOCUMENTS_LOCATION + '/' + baseName;
View Full Code Here

            // remove properties where overlay makes no sense
            tmp.remove(SharedConstants.SLING_HOME);
            tmp.remove(SharedConstants.SLING_LAUNCHPAD);
            tmp.remove(SharedConstants.SLING_PROPERTIES);

            tmp.store(os, "Overlay properties for configuration");
        } catch (Exception ex) {
            this.logger.log(Logger.LOG_ERROR,
                "Error loading overlay properties from " + propFile, ex);
        } finally {
            if (os != null) {
View Full Code Here

    props.put("sling.resource.path", r == null ? "" : r.getPath());
    props.put("sling.resource.type", r == null ? "" : r.getResourceType());
    props.put("http.request.method", request.getMethod());
   
    setCustomProperties(props);
    props.store(response.getOutputStream(), "Data created by " + getClass().getName() + " at " + new Date());
    response.getOutputStream().flush();
  }
 
  /** Hook for additional custom properties */
  void setCustomProperties(Properties props) {
View Full Code Here

                    setAddWhitespaceAfterDelimiter(false);
            }

            p.setProperty(key, val);
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            p.store(out, null);

            Properties copy = new Properties();
            copy.setProperty(key, val);
            ByteArrayOutputStream copyOut = new ByteArrayOutputStream();
            copy.store(copyOut, null);
View Full Code Here

            p.store(out, null);

            Properties copy = new Properties();
            copy.setProperty(key, val);
            ByteArrayOutputStream copyOut = new ByteArrayOutputStream();
            copy.store(copyOut, null);

            p = formattingProps ?
                new FormatPreservingProperties() : new Properties();

            InputStream in = new BufferedInputStream
View Full Code Here

            p2.setProperty("xxx", values[i]);

            ByteArrayOutputStream out1 = new ByteArrayOutputStream();
            ByteArrayOutputStream out2 = new ByteArrayOutputStream();

            p1.store(out1, null);
            p2.store(out2, null);

            String s1 = new String(out1.toByteArray());
            String s2 = new String(out2.toByteArray());
View Full Code Here

        dojoProps.setProperty("dojo-root", fullPath);
        dojoProps.setProperty("dojo-source-metadata-root", fullPath);

        try {
         
          dojoProps.store(new FileOutputStream(settingsFile), null);
        } catch (MalformedURLException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        } catch (IOException e) {
          // TODO Auto-generated catch block
View Full Code Here

            dojoValidationProps.setProperty(key, value);
          }
        }
       
        try {
          dojoValidationProps.store(new FileOutputStream(settingsFile), null);
        } catch (MalformedURLException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        } catch (IOException e) {
          // TODO Auto-generated catch block
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.