Package java.util

Examples of java.util.Properties.save()


                        sb.append(" ");
                    }
                }
                props.put(k.trim(), sb.toString());
            }
            props.save(out, "aliases");
        } finally {
            try {
                out.close();
            } catch (Exception ignored) {
            }
View Full Code Here


            long l = Long.parseLong(suffix) + 1;
            suffix = new Long(l).toString();
        }
        p.put(factoryPid, suffix);
        FileOutputStream os = new FileOutputStream(pidFile);
        p.save(os, "Suffixes used for generating pids");
        if (os != null) {
            os.close();
        }
        return factoryPid + "." + suffix;
    }
View Full Code Here

            if( requiredSecret !=null ) {
                props.put( "secret", requiredSecret );
            }

            FileOutputStream stopF=new FileOutputStream( sf );
            props.save( stopF, "Automatically generated, don't edit" );
        } catch( IOException ex ) {
            log.debug( "Can't create stop file: "+sf );
            ex.printStackTrace();
        }
    }
View Full Code Here

    }

    FileOutputStream os = new FileOutputStream(outputfile);
    try
    {
      outputProp.save(os,
              header.
              concat("# config is ").concat(config).
              concat(footer));
    }
    finally
View Full Code Here

    }

    FileOutputStream os = new FileOutputStream(outputfile);
    try
    {
      outputProp.save(os,
              header.
              concat("# config is ").concat(config).
              concat(footer));
    }
    finally
View Full Code Here

  String comment = request.props.getProperty(prefix + "comment");
  if (comment == null) {
      comment = prefix + this.getClass() + " selecting: " + select;
  }
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  p.save(out,comment);
  request.sendResponse(out.toByteArray(), type);
  return true;
    }
}
View Full Code Here

      request.props.containsKey("UrlID") ||
      request.props.containsKey("gotCookie"))) {
        File file = getPropsFile(name, id);
        try {
      FileOutputStream out = new FileOutputStream(file);
      p.save(out, request.serverUrl() + request.url +
          " (from ConfigFileHandler: " + propsPrefix + ")");
      out.close();
      request.log(Server.LOG_DIAGNOSTIC, propsPrefix,
          "Saving configuration properties to " + file);
        } catch (IOException e) {
View Full Code Here

      if (!isMd5Digest(value)) {
    p.put(key, computeA1(key, args[0], value));
    i++;
      }
  }
  p.save(System.out, "Digested with realm: " + args[0]);
  System.err.println("" + i + " passwords digested");
  System.exit(0);
    }
}
View Full Code Here

       */

      try {
    FileOutputStream  out = new FileOutputStream(
      new File(dir, filePrefix  + VERSION));
    types.save(out, "Brazil server state from " +
      request.serverUrl());
    out.close();
      } catch (IOException ex) {
    request.log(Server.LOG_DIAGNOSTIC, prefix,
      "Saving TOC file");
View Full Code Here

        myProps.setProperty("Property A", "aye");
        myProps.setProperty("Property B", "bee");
        myProps.setProperty("Property C", "see");

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        myProps.save(out, "A Header");
        out.close();

        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
        Properties myProps2 = new Properties();
        myProps2.load(in);
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.