コード例 #1
0
  private Properties writeDefaultDesktopAgentPropertiesFile(File objPropertiesFile)
      throws InvalidPropertiesFormatException, IOException {
    Properties tempProps = new Properties();
    FileOutputStream fos = new FileOutputStream(objPropertiesFile);

    tempProps.put("desktop_agent_left", "0");
    tempProps.put("desktop_agent_top", "0");
    tempProps.put("desktop_agent_width", "300");
    tempProps.put("desktop_agent_height", "450");
    tempProps.put("desktop_agent_use_custom_window_controls", "false");
    tempProps.put("desktop_agent_background_color", "808080");
    tempProps.put("desktop_agent_buttons_background_color", "808080");

    tempProps.put("agents_directory", "Desktop Agent Agents");
    tempProps.put("number_of_agents", "1");
    tempProps.put("agent_files", "GreetingAgent.agent");

    tempProps.storeToXML(fos, "Desktop Agent Properties File", "UTF-8");

    return tempProps;
  }
コード例 #2
0
 public void writeProperties() throws InvalidPropertiesFormatException, IOException {
   FileOutputStream fos = new FileOutputStream(propertiesFile);
   properties.storeToXML(fos, "Desktop Agent Properties File", "UTF-8");
 }